blob: 59d349f0dfdce4a4bc80bba7d2978fcfd7518a16 [file] [log] [blame]
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +00001; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
2; RUN: verify-uselistorder %s
3
Peter Collingbourned4bff302015-11-05 22:03:56 +00004; CHECK: define void @_Z3foov() !dbg !9
5define void @_Z3foov() !dbg !9 {
6 ret void
7}
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +00008
Peter Collingbournea1f86252016-03-17 23:58:03 +00009; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11}
10!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11}
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +000011
Duncan P. N. Exon Smithce2b9832015-03-28 02:26:45 +000012!0 = !{null}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000013!1 = distinct !DICompositeType(tag: DW_TAG_structure_type)
14!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
15!3 = !DISubroutineType(types: !0)
16!4 = distinct !DICompositeType(tag: DW_TAG_structure_type)
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +000017!5 = distinct !{}
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000018!6 = distinct !{}
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +000019
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000020; CHECK: !7 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false)
21!7 = distinct !DISubprogram()
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +000022
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000023; CHECK: !8 = !DISubprogram(scope: null, isLocal: false, isDefinition: false, isOptimized: false)
24!8 = !DISubprogram(isDefinition: false)
Duncan P. N. Exon Smith19fc5ed2015-02-13 01:26:47 +000025
Peter Collingbourned4bff302015-11-05 22:03:56 +000026; CHECK: !9 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, isDefinition: true, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, templateParams: !5, declaration: !8, variables: !6)
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000027!9 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1,
28 file: !2, line: 7, type: !3, isLocal: true,
29 isDefinition: true, scopeLine: 8, containingType: !4,
30 virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10,
Peter Collingbourned4bff302015-11-05 22:03:56 +000031 flags: DIFlagPrototyped, isOptimized: true,
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000032 templateParams: !5, declaration: !8, variables: !6)
Peter Collingbourned4bff302015-11-05 22:03:56 +000033
Peter Collingbournea1f86252016-03-17 23:58:03 +000034; CHECK: !10 = distinct !DISubprogram
35; CHECK-SAME: virtualIndex: 0,
36!10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1,
37 file: !2, line: 7, type: !3, isLocal: true,
38 isDefinition: true, scopeLine: 8, containingType: !4,
39 virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 0,
40 flags: DIFlagPrototyped, isOptimized: true,
41 templateParams: !5, declaration: !8, variables: !6)
42
43; CHECK: !11 = distinct !DISubprogram
44; CHECK-NOT: virtualIndex
45!11 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1,
46 file: !2, line: 7, type: !3, isLocal: true,
47 isDefinition: true, scopeLine: 8, containingType: !4,
48 virtuality: DW_VIRTUALITY_none,
49 flags: DIFlagPrototyped, isOptimized: true,
50 templateParams: !5, declaration: !8, variables: !6)
51
52!12 = !{i32 1, !"Debug Info Version", i32 3}
53!llvm.module.flags = !{!12}