llvm.org GIT mirror llvm / fe735e5
[DebugInfo] Fix tests so that each subprogram belongs to a CU. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265490 91177308-0d34-0410-b5e6-96231b3b80d8 Davide Italiano 3 years ago
14 changed file(s) with 89 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
2121 ret i32 4, !dbg !DILocation(scope: !1)
2222 }
2323
24 !llvm.dbg.cu = !{!6}
25
2426 declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
2527
2628 !7 = !{!1}
3234 !4 = !{!5}
3335 !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
3436 !8 = !DIFile(filename: "/d/j/debug-test.c", directory: "/Volumes/Data/b")
35 !9 = !{i32 0}
37 !9 = !{}
3638
3739 !llvm.module.flags = !{!10}
3840 !10 = !{i32 1, !"Debug Info Version", i32 3}
11 ; RUN: verify-uselistorder %s
22
33 ; CHECK-LABEL: @test
4 ; CHECK: ret void, !bar !1, !foo !0
4 ; CHECK: ret void, !bar !4, !foo !5
55 define void @test() {
66 add i32 2, 1, !bar !0
77 add i32 1, 2, !foo !1
1010 ret void, !foo !0, !bar !1
1111 }
1212
13 ; CHECK-LABEL: define void @test2() !foo !2 !baz !3
13 ; CHECK-LABEL: define void @test2() !foo !6 !baz !7
1414 define void @test2() !foo !2 !baz !3 {
1515 unreachable
1616 }
1717
18 ; CHECK-LABEL: define void @test3() !bar !3
19 ; CHECK: unreachable, !bar !4
18 ; CHECK-LABEL: define void @test3() !bar !7
19 ; CHECK: unreachable, !bar !8
2020 define void @test3() !bar !3 {
2121 unreachable, !bar !4
2222 }
2323
2424 ; CHECK-LABEL: define void @test_attachment_name() {
25 ; CHECK: unreachable, !\342abc !4
25 ; CHECK: unreachable, !\342abc !8
2626 define void @test_attachment_name() {
2727 ;; Escape the first character when printing text IR, since it's a digit
2828 unreachable, !\34\32abc !4
2929 }
3030
31 !llvm.module.flags = !{!7}
32 !llvm.dbg.cu = !{!5}
3133 !0 = !DILocation(line: 662302, column: 26, scope: !1)
3234 !1 = distinct !DISubprogram(name: "foo")
3335 !2 = distinct !{}
3436 !3 = distinct !{}
3537 !4 = distinct !{}
38 !5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
39 file: !6,
40 isOptimized: true, flags: "-O2",
41 splitDebugFilename: "abc.debug", emissionKind: 2,
42 subprograms: !{!1})
43 !6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
44 !7 = !{i32 2, !"Debug Info Version", i32 3}
3645
3746 declare void @llvm.dbg.func.start(metadata) nounwind readnone
3847
3030 !llvm.dbg.cu = !{!0}
3131 !llvm.module.flags = !{!3}
3232
33 !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2)
33 !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2,
34 subprograms: !{!5})
3435 !1 = !DIFile(filename: "t.c", directory: "")
3536 !2 = !{}
3637 !3 = !{i32 1, !"Debug Info Version", i32 3}
5152 maxAlignment: 16
5253 # CHECK-LABEL: foo
5354 # CHECK: stack:
54 # CHECK: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!4',
55 # CHECK-NEXT: di-expression: '!10', di-location: '!11' }
55 # CHECK: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!6',
56 # CHECK-NEXT: di-expression: '!11', di-location: '!12' }
5657 stack:
5758 - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!4',
5859 di-expression: '!7', di-location: '!8' }
5252 !2 = distinct !DILexicalBlock(line: 44, column: 0, file: !101, scope: !3)
5353 !3 = distinct !DISubprogram(name: "getClosestDiagonal3", linkageName: "_Z19getClosestDiagonal3ii", line: 44, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !101, scope: null, type: !6)
5454 !4 = !DIFile(filename: "ggEdgeDiscrepancy.cc", directory: "/Volumes/Home/grosbaj/sources/llvm-externals/speccpu2000/benchspec/CINT2000/252.eon/src")
55 !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !101, enums: !102, retainedTypes: !102, subprograms: !103)
55 !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !101, enums: !102, retainedTypes: !102, subprograms: !{!3, !37, !41, !42, !77})
5656 !6 = !DISubroutineType(types: !7)
5757 !7 = !{!8, !22, !22}
5858 !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "ggVector3", line: 66, size: 192, align: 32, file: !99, elements: !10)
20212021 ; CHECK: call void @__tsan_atomic_thread_fence(i32 5), !dbg
20222022
20232023 !llvm.module.flags = !{!0, !1, !2}
2024 !llvm.dbg.cu = !{!8}
20242025 !0 = !{i32 2, !"Dwarf Version", i32 4}
20252026 !1 = !{i32 2, !"Debug Info Version", i32 3}
20262027 !2 = !{i32 1, !"PIC Level", i32 2}
20302031 !5 = !DIFile(filename: "atomic.cpp", directory: "/tmp")
20312032 !6 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 99, type: !4, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !3)
20322033 !7 = !DILocation(line: 100, column: 1, scope: !6)
2034
2035 !8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
2036 file: !5,
2037 isOptimized: true, flags: "-O2",
2038 splitDebugFilename: "abc.debug", emissionKind: 2,
2039 subprograms: !{!6})
9191 !6 = !{!"int", !3, i64 0}
9292
9393 !llvm.module.flags = !{!7, !8, !9}
94 !llvm.dbg.cu = !{!18}
9495 !7 = !{i32 2, !"Dwarf Version", i32 4}
9596 !8 = !{i32 2, !"Debug Info Version", i32 3}
9697 !9 = !{i32 1, !"PIC Level", i32 2}
103104 !15 = !DILocation(line: 101, column: 1, scope: !13)
104105 !16 = !DILocation(line: 102, column: 1, scope: !13)
105106 !17 = !DILocation(line: 103, column: 1, scope: !13)
106
107 !18 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
108 file: !12,
109 isOptimized: true, flags: "-O2",
110 splitDebugFilename: "abc.debug", emissionKind: 2,
111 subprograms: !{!13})
3636 }
3737
3838 !llvm.module.flags = !{!0, !1, !2}
39 !llvm.dbg.cu = !{!12}
3940 !0 = !{i32 2, !"Dwarf Version", i32 4}
4041 !1 = !{i32 2, !"Debug Info Version", i32 3}
4142 !2 = !{i32 1, !"PIC Level", i32 2}
4950 !9 = !DILocation(line: 45, column: 1, scope: !6)
5051 !10 = !DILocation(line: 46, column: 1, scope: !6)
5152 !11 = !DILocation(line: 47, column: 1, scope: !6)
53 !12 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
54 file: !5,
55 isOptimized: true, flags: "-O2",
56 splitDebugFilename: "abc.debug", emissionKind: 2,
57 subprograms: !{!6})
3030 }
3131
3232 !llvm.module.flags = !{!1}
33 !llvm.dbg.cu = !{!5}
34
3335 !1 = !{i32 2, !"Debug Info Version", i32 3}
3436 !2 = distinct !DISubprogram()
3537 !3 = !DILocation(line: 1, scope: !2)
3638 !4 = !DILocation(line: 2, scope: !2)
39 !5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
40 file: !6,
41 isOptimized: true, flags: "-O2",
42 splitDebugFilename: "abc.debug", emissionKind: 2,
43 subprograms: !{!2})
44 !6 = !DIFile(filename: "path/davidino", directory: "/path/to/dir")
7272 ; CHECK-DAG: [[LPAD_PREHEADER_LOC]] = !DILocation(line: 85, column: 1, scope: !{{[0-9]+}})
7373
7474 !llvm.module.flags = !{!0, !1, !2}
75 !llvm.dbg.cu = !{!14}
7576 !0 = !{i32 2, !"Dwarf Version", i32 4}
7677 !1 = !{i32 2, !"Debug Info Version", i32 3}
7778 !2 = !{i32 1, !"PIC Level", i32 2}
8788 !11 = !DILocation(line: 73, column: 46, scope: !6)
8889 !12 = !DILocation(line: 75, column: 9, scope: !6)
8990 !13 = !DILocation(line: 85, column: 1, scope: !6)
91 !14 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
92 file: !5,
93 isOptimized: true, flags: "-O2",
94 splitDebugFilename: "abc.debug", emissionKind: 2,
95 subprograms: !{!6})
2323 }
2424
2525 !llvm.module.flags = !{!0, !1}
26 !llvm.dbg.cu = !{!12}
2627 !0 = !{i32 2, !"Dwarf Version", i32 4}
2728 !1 = !{i32 2, !"Debug Info Version", i32 3}
2829
3637 !9 = !DILocation(line: 103, column: 1, scope: !5)
3738 !10 = !DILocation(line: 104, column: 1, scope: !5)
3839 !11 = !DILocation(line: 105, column: 1, scope: !5)
40 !12 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
41 file: !4,
42 isOptimized: true, flags: "-O2",
43 splitDebugFilename: "abc.debug", emissionKind: 2,
44 subprograms: !{!5})
5252 }
5353
5454 !llvm.module.flags = !{!0, !1, !2}
55 !llvm.dbg.cu = !{!11}
5556 !0 = !{i32 2, !"Dwarf Version", i32 4}
5657 !1 = !{i32 2, !"Debug Info Version", i32 3}
5758 !2 = !{i32 1, !"PIC Level", i32 2}
6465 !8 = !DILocation(line: 101, column: 1, scope: !6)
6566 !9 = !DILocation(line: 102, column: 1, scope: !6)
6667 !10 = !DILocation(line: 103, column: 1, scope: !6)
68 !11 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
69 file: !5,
70 isOptimized: true, flags: "-O2",
71 splitDebugFilename: "abc.debug", emissionKind: 2,
72 subprograms: !{!6})
7070
7171 attributes #0 = { nounwind }
7272
73 !llvm.dbg.cu = !{!28}
7374 !llvm.module.flags = !{!0, !1}
7475 !llvm.ident = !{!2}
7576
101102 !25 = !DILocation(line: 17, column: 11, scope: !20)
102103 !26 = distinct !{!26, !27, !18}
103104 !27 = !{!"llvm.loop.vectorize.enable", i1 true}
105 !28 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
106 file: !5,
107 isOptimized: true, flags: "-O2",
108 splitDebugFilename: "abc.debug", emissionKind: 2,
109 subprograms: !{!4, !20})
6666 ; CHECK: [[BODY_LOC]] = !DILocation(line: 101, column: 1, scope: !{{.*}})
6767
6868 !llvm.module.flags = !{!0, !1}
69 !llvm.dbg.cu = !{!9}
6970 !0 = !{i32 2, !"Dwarf Version", i32 4}
7071 !1 = !{i32 2, !"Debug Info Version", i32 3}
7172
7677 !6 = !DILocation(line: 100, column: 1, scope: !5)
7778 !7 = !DILocation(line: 101, column: 1, scope: !5)
7879 !8 = !DILocation(line: 102, column: 1, scope: !5)
80 !9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
81 file: !10,
82 isOptimized: true, flags: "-O2",
83 splitDebugFilename: "abc.debug", emissionKind: 2,
84 subprograms: !{!5})
85 !10 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
86 !11 = !{i32 2, !"Debug Info Version", i32 3}
30363036 }
30373037
30383038 !llvm.module.flags = !{!1}
3039 !llvm.dbg.cu = !{!3}
30393040
30403041 !0 = !{}
30413042 !1 = !{i32 1, !"Debug Info Version", i32 3}
30423043 !2 = distinct !DISubprogram()
3044 !3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
3045 file: !4,
3046 isOptimized: true, flags: "-O2",
3047 splitDebugFilename: "abc.debug", emissionKind: 2,
3048 subprograms: !{!2})
3049 !4 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
3050 !5 = !{i32 2, !"Debug Info Version", i32 3}
30433051
30443052 ; CHECK: attributes #0 = { nounwind readnone }
30453053 ; CHECK: attributes [[NUW]] = { nounwind }