@@ -11,8 +11,8 @@ CHECK-NEXT: DW_TAG_compile_unit
11
11
CHECK: CAS Block: llvmcas://[[SUBPROGRAM_FOO:[a-z0-9]+]]
12
12
CHECK-NEXT: DW_TAG_subprogram
13
13
CHECK: mc:debug_line llvmcas://
14
- CHECK-NEXT: mc:debug_line llvmcas://
15
14
CHECK-NEXT: mc:debug_line llvmcas://[[LINETABLECASID:[a-z0-9]+]]
15
+ CHECK-NEXT: mc:debug_line llvmcas://
16
16
17
17
18
18
CHECK: mc:assembler
@@ -22,79 +22,109 @@ CHECK: CAS Block: llvmcas://[[SUBPROGRAM_FOO]]
22
22
CHECK-NEXT: DW_TAG_subprogram
23
23
CHECK: mc:debug_line llvmcas://
24
24
CHECK-NEXT: mc:debug_line llvmcas://
25
- CHECK-NEXT: mc:debug_line llvmcas://
26
25
CHECK-NEXT: mc:debug_line llvmcas://[[LINETABLECASID]]
26
+ CHECK-NEXT: mc:debug_line llvmcas://
27
27
28
28
//--- a.ll
29
29
30
- target triple = "arm64-apple-macosx12.0.0"
31
- define void @foo() #0 !dbg !9 {
32
- ret void, !dbg !14
30
+ ; ModuleID = 'a.cpp'
31
+ source_filename = "a.cpp"
32
+ target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
33
+ target triple = "arm64-apple-macosx13.0.0"
34
+
35
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
36
+ define i32 @_Z3foov() #0 !dbg !10 {
37
+ ret i32 3, !dbg !16
33
38
}
34
- define void @bar(i32 noundef %x) #0 !dbg !15 {
35
- ret void, !dbg !23
39
+
40
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
41
+ define i32 @_Z4foo2v() #0 !dbg !17 {
42
+ ret i32 4, !dbg !18
36
43
}
37
- attributes #0 = { noinline nounwind optnone ssp uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" }
38
- !llvm.dbg.cu = !{!0}
39
- !llvm.module.flags = !{!2, !3, !4, !5, !6, !7}
40
- !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 16.0.0 (https://github.com/apple/llvm-project.git d74d0d9fde90cccba7bf18066ac56e55e4402948)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None, sysroot: "/")
41
- !1 = !DIFile(filename: "a.c", directory: "/Users/shubham/Development/CASDelta")
42
- !2 = !{i32 7, !"Dwarf Version", i32 4}
43
- !3 = !{i32 2, !"Debug Info Version", i32 3}
44
- !4 = !{i32 1, !"wchar_size", i32 4}
45
- !5 = !{i32 7, !"PIC Level", i32 2}
46
- !6 = !{i32 7, !"uwtable", i32 2}
47
- !7 = !{i32 7, !"frame-pointer", i32 2}
48
- !9 = distinct !DISubprogram(name: "foo", scope: !10, file: !10, line: 1, type: !11, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)
49
- !10 = !DIFile(filename: "./foo.h", directory: "/Users/shubham/Development/CASDelta")
50
- !11 = !DISubroutineType(types: !12)
51
- !12 = !{null}
52
- !13 = !{}
53
- !14 = !DILocation(line: 2, column: 3, scope: !9)
54
- !15 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !16, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)
55
- !16 = !DISubroutineType(types: !17)
56
- !17 = !{!18, !18}
57
- !18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
58
- !23 = !DILocation(line: 3, column: 3, scope: !15)
44
+
45
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
46
+ define i32 @_Z3barv() #0 !dbg !19 {
47
+ ret i32 2, !dbg !20
48
+ }
49
+
50
+ !llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6}
51
+ !llvm.dbg.cu = !{!7}
52
+ !llvm.ident = !{!9}
53
+
54
+ !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 14, i32 0]}
55
+ !1 = !{i32 7, !"Dwarf Version", i32 4}
56
+ !2 = !{i32 2, !"Debug Info Version", i32 3}
57
+ !3 = !{i32 1, !"wchar_size", i32 4}
58
+ !4 = !{i32 8, !"PIC Level", i32 2}
59
+ !5 = !{i32 7, !"uwtable", i32 1}
60
+ !6 = !{i32 7, !"frame-pointer", i32 1}
61
+ !7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !8, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None, sysroot: "/Users/somepath", sdk: "MacOSX.sdk")
62
+ !8 = !DIFile(filename: "a.cpp", directory: "/Users/shubham/Development/testclang")
63
+ !9 = !{!"clang"}
64
+ !10 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !11, file: !11, line: 1, type: !12, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !15)
65
+ !11 = !DIFile(filename: "./foo.h", directory: "/Users/shubham/Development/testclang")
66
+ !12 = !DISubroutineType(types: !13)
67
+ !13 = !{!14}
68
+ !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
69
+ !15 = !{}
70
+ !16 = !DILocation(line: 2, column: 3, scope: !10)
71
+ !17 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2v", scope: !11, file: !11, line: 4, type: !12, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !15)
72
+ !18 = !DILocation(line: 5, column: 3, scope: !17)
73
+ !19 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", scope: !8, file: !8, line: 2, type: !12, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !15)
74
+ !20 = !DILocation(line: 3, column: 3, scope: !19)
75
+
59
76
60
77
//--- b.ll
61
78
62
- target triple = "arm64-apple-macosx12.0.0"
63
- define i32 @baz() #0 !dbg !9 {
64
- ret i32 1, !dbg !14
79
+ ; ModuleID = 'b.cpp'
80
+ source_filename = "b.cpp"
81
+ target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
82
+ target triple = "arm64-apple-macosx13.0.0"
83
+
84
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
85
+ define i32 @_Z3bazv() #0 !dbg !10 {
86
+ ret i32 1, !dbg !15
87
+ }
88
+
89
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
90
+ define i32 @_Z3foov() #0 !dbg !16 {
91
+ ret i32 3, !dbg !18
65
92
}
66
- define void @foo() #0 !dbg !15 {
67
- ret void, !dbg !19
93
+
94
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
95
+ define i32 @_Z4foo2v() #0 !dbg !19 {
96
+ ret i32 4, !dbg !20
68
97
}
69
- define void @bar(i32 noundef %x) #0 !dbg !20 {
70
- entry:
71
- ret void, !dbg !27
98
+
99
+ ; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
100
+ define i32 @_Z3barv() #0 !dbg !21 {
101
+ ret i32 2, !dbg !22
72
102
}
73
- attributes #0 = { noinline nounwind optnone ssp uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" }
74
- !llvm.dbg.cu = !{!0}
75
- !llvm.module.flags = !{!2, !3, !4, !5, !6, !7}
76
- !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 16.0.0 (https://github.com/apple/llvm-project.git d74d0d9fde90cccba7bf18066ac56e55e4402948)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None, sysroot: "/")
77
- !1 = !DIFile(filename: "b.c", directory: "/Users/shubham/Development/CASDelta")
78
- !2 = !{i32 7 , !"Dwarf Version", i32 4 }
79
- !3 = !{i32 2 , !"Debug Info Version", i32 3 }
80
- !4 = !{i32 1 , !"wchar_size ", i32 4 }
81
- !5 = !{i32 7 , !"PIC Level ", i32 2 }
82
- !6 = !{i32 7 , !"uwtable ", i32 2}
83
- !7 = !{i32 7, !"frame-pointer ", i32 2 }
84
- !9 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 1, type: !10, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)
85
- !10 = !DISubroutineType(types: !11 )
86
- !11 = !{!12}
87
- !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
88
- !13 = !{}
89
- !14 = !DILocation(line: 2, column: 5, scope: !9 )
90
- !15 = distinct !DISubprogram(name: "foo", scope: !16, file: !16, line: 1, type: !17, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)
91
- !16 = !DIFile(filename : "./foo.h ", directory: "/Users/shubham/Development/CASDelta" )
92
- !17 = !DISubroutineType(types: !18)
93
- !18 = !{null}
94
- !19 = !DILocation(line: 2, column: 3 , scope: !15 )
95
- !20 = distinct !DISubprogram(name : "bar ", scope: !1, file: !1, line: 6, type: !21, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13 )
96
- !21 = !DISubroutineType(types: !22 )
97
- !22 = !{!12, !12}
98
- !25 = !DILocation(line: 7 , column: 10 , scope: !20 )
99
- !26 = !DILocation( line: 7, column: 11, scope: !20 )
100
- !27 = !DILocation(line: 7 , column: 3 , scope: !20 )
103
+
104
+ !llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6 }
105
+ !llvm.dbg.cu = !{!7}
106
+ !llvm.ident = !{!9}
107
+
108
+ !0 = !{i32 2 , !"SDK Version", [2 x i32] [i32 14, i32 0] }
109
+ !1 = !{i32 7 , !"Dwarf Version", i32 4 }
110
+ !2 = !{i32 2 , !"Debug Info Version ", i32 3 }
111
+ !3 = !{i32 1 , !"wchar_size ", i32 4 }
112
+ !4 = !{i32 8 , !"PIC Level ", i32 2}
113
+ !5 = !{i32 7, !"uwtable ", i32 1 }
114
+ !6 = !{i32 7, !"frame-pointer", i32 1}
115
+ !7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !8, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None, sysroot: "/Users/somepath", sdk: "MacOSX.some.sdk" )
116
+ !8 = !DIFile(filename: "b.cpp", directory: "/Users/shubham/Development/testclang")
117
+ !9 = !{!"clang"}
118
+ !10 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", scope: !8, file: !8, line: 1, type: !11, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !14)
119
+ !11 = !DISubroutineType(types: !12 )
120
+ !12 = !{!13}
121
+ !13 = !DIBasicType(name : "int ", size: 32, encoding: DW_ATE_signed )
122
+ !14 = !{}
123
+ !15 = !DILocation(line: 2, column: 5, scope: !10)
124
+ !16 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov" , scope: !17, file: !17, line: 1, type: !11, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !14 )
125
+ !17 = !DIFile(filename : "./foo.h ", directory: "/Users/shubham/Development/testclang" )
126
+ !18 = !DILocation(line: 2, column: 3, scope: !16 )
127
+ !19 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2v", scope: !17, file: !17, line: 4, type: !11, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !14)
128
+ !20 = !DILocation(line: 5 , column: 3 , scope: !19 )
129
+ !21 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", scope: !8, file: !8, line: 5, type: ! 11, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !14 )
130
+ !22 = !DILocation(line: 6 , column: 5 , scope: !21 )
0 commit comments