Duncan P. N. Exon Smith | 19fc5ed | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s |
| 2 | ; RUN: verify-uselistorder %s |
| 3 | |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 4 | ; CHECK: define void @_Z3foov() !dbg !9 |
| 5 | define void @_Z3foov() !dbg !9 { |
| 6 | ret void |
| 7 | } |
Duncan P. N. Exon Smith | 19fc5ed | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 8 | |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 9 | ; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12} |
| 10 | !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12} |
Duncan P. N. Exon Smith | 19fc5ed | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 11 | |
Duncan P. N. Exon Smith | ce2b983 | 2015-03-28 02:26:45 +0000 | [diff] [blame] | 12 | !0 = !{null} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 13 | !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 Smith | 19fc5ed | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 17 | !5 = distinct !{} |
Duncan P. N. Exon Smith | 814b8e9 | 2015-08-28 20:26:49 +0000 | [diff] [blame] | 18 | !6 = distinct !{} |
Duncan P. N. Exon Smith | 19fc5ed | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 19 | |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 20 | ; CHECK: !7 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !8) |
| 21 | !7 = distinct !DISubprogram(unit: !8) |
Duncan P. N. Exon Smith | 19fc5ed | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 22 | |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 23 | !8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", |
Davide Italiano | a017306 | 2016-04-04 02:11:34 +0000 | [diff] [blame] | 24 | file: !2, |
| 25 | isOptimized: true, flags: "-O2", |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 26 | splitDebugFilename: "abc.debug", emissionKind: 2) |
| 27 | |
| 28 | ; CHECK: !9 = !DISubprogram(scope: null, isLocal: false, isDefinition: false, isOptimized: false) |
| 29 | !9 = !DISubprogram(isDefinition: false) |
| 30 | |
Adrian Prantl | c19dee7 | 2016-08-17 16:02:43 +0000 | [diff] [blame^] | 31 | ; CHECK: !10 = 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, thisAdjustment: 3, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: true, unit: !8, templateParams: !5, declaration: !9, variables: !6) |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 32 | !10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, |
| 33 | file: !2, line: 7, type: !3, isLocal: true, |
| 34 | isDefinition: true, scopeLine: 8, |
| 35 | containingType: !4, |
| 36 | virtuality: DW_VIRTUALITY_pure_virtual, |
Adrian Prantl | c19dee7 | 2016-08-17 16:02:43 +0000 | [diff] [blame^] | 37 | virtualIndex: 10, thisAdjustment: 3, flags: DIFlagPrototyped | DIFlagNoReturn, |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 38 | isOptimized: true, unit: !8, templateParams: !5, |
| 39 | declaration: !9, variables: !6) |
| 40 | |
| 41 | ; CHECK: !11 = distinct !DISubprogram |
| 42 | ; CHECK-SAME: virtualIndex: 0, |
| 43 | !11 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, |
| 44 | file: !2, line: 7, type: !3, isLocal: true, |
| 45 | isDefinition: true, scopeLine: 8, |
| 46 | containingType: !4, |
| 47 | virtuality: DW_VIRTUALITY_pure_virtual, |
| 48 | virtualIndex: 0, |
| 49 | flags: DIFlagPrototyped, isOptimized: true, |
| 50 | unit: !8, templateParams: !5, declaration: !9, |
| 51 | variables: !6) |
| 52 | |
| 53 | ; CHECK: !12 = distinct !DISubprogram |
| 54 | ; CHECK-NOT: virtualIndex |
| 55 | !12 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, |
| 56 | file: !2, line: 7, type: !3, isLocal: true, |
| 57 | isDefinition: true, scopeLine: 8, |
| 58 | containingType: !4, |
| 59 | virtuality: DW_VIRTUALITY_none, |
| 60 | flags: DIFlagPrototyped, isOptimized: true, |
| 61 | unit: !8, |
| 62 | templateParams: !5, declaration: !9, variables: !6) |
| 63 | |
| 64 | !13 = !{i32 1, !"Debug Info Version", i32 3} |
| 65 | !llvm.module.flags = !{!13} |
| 66 | !llvm.dbg.cu = !{!8} |