Skip to content

Commit 61d07d9

Browse files
author
Yonghong Song
committed
[SampleProfile][Test] Fix DISubroutineType debuginfo for two tests
During development of [1], I found two test failures llvm/test/Transforms/SampleProfile/ctxsplit.ll llvm/test/Transforms/SampleProfile/flattened.ll due to incorrect DISubroutineType(s). This patch fixed the issue with proper types. [1] #157349
1 parent cda542d commit 61d07d9

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

llvm/test/Transforms/SampleProfile/ctxsplit.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ attributes #0 = { "use-sample-profile" }
5151
!4 = !{i32 2, !"Debug Info Version", i32 3}
5252
!5 = !{i32 1, !"wchar_size", i32 4}
5353
!6 = !{!"clang version 8.0.0 (trunk 345241)"}
54-
!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !2)
54+
!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !12, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !2)
5555
!8 = !DISubroutineType(types: !2)
5656
!9 = !DILocation(line: 2, column: 3, scope: !7)
57-
!10 = distinct !DISubprogram(name: "goo", scope: !1, file: !1, line: 8, type: !8, isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, unit: !0, retainedNodes: !2)
57+
!10 = distinct !DISubprogram(name: "goo", scope: !1, file: !1, line: 8, type: !12, isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, unit: !0, retainedNodes: !2)
5858
!11 = !DILocation(line: 10, column: 3, scope: !10)
59-
59+
!12 = !DISubroutineType(types: !13)
60+
!13 = !{!14}
61+
!14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)

llvm/test/Transforms/SampleProfile/flattened.ll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ entry:
3131
!4 = !{i32 2, !"Debug Info Version", i32 3}
3232
!5 = !{i32 1, !"wchar_size", i32 4}
3333
!6 = !{!"clang version 8.0.0 (trunk 345241)"}
34-
!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !2)
34+
!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !2)
3535
!8 = !DISubroutineType(types: !2)
3636
!9 = !DILocation(line: 2, column: 3, scope: !7)
37+
!10 = !DISubroutineType(types: !11)
38+
!11 = !{!12}
39+
!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)

0 commit comments

Comments
 (0)