Duncan P. N. Exon Smith | ed356a9 | 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 | 5f220be | 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 | ed356a9 | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 8 | |
Paul Robinson | ccefd88 | 2018-11-28 21:14:32 +0000 | [diff] [blame] | 9 | ; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15} |
| 10 | !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15} |
Duncan P. N. Exon Smith | ed356a9 | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 11 | |
Duncan P. N. Exon Smith | d397a52 | 2015-03-28 02:26:45 +0000 | [diff] [blame] | 12 | !0 = !{null} |
Duncan P. N. Exon Smith | e56023a | 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 | ed356a9 | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 17 | !5 = distinct !{} |
Duncan P. N. Exon Smith | a5ae7c1 | 2015-08-28 20:26:49 +0000 | [diff] [blame] | 18 | !6 = distinct !{} |
Duncan P. N. Exon Smith | ed356a9 | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 19 | |
Paul Robinson | ccefd88 | 2018-11-28 21:14:32 +0000 | [diff] [blame] | 20 | ; CHECK: !7 = distinct !DISubprogram(scope: null, spFlags: DISPFlagDefinition, unit: !8) |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 21 | !7 = distinct !DISubprogram(unit: !8) |
Duncan P. N. Exon Smith | ed356a9 | 2015-02-13 01:26:47 +0000 | [diff] [blame] | 22 | |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 23 | !8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", |
Davide Italiano | 5b62b45 | 2016-04-04 02:11:34 +0000 | [diff] [blame] | 24 | file: !2, |
| 25 | isOptimized: true, flags: "-O2", |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 26 | splitDebugFilename: "abc.debug", emissionKind: 2) |
| 27 | |
Paul Robinson | ccefd88 | 2018-11-28 21:14:32 +0000 | [diff] [blame] | 28 | ; CHECK: !9 = !DISubprogram(scope: null, spFlags: 0) |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 29 | !9 = !DISubprogram(isDefinition: false) |
| 30 | |
Paul Robinson | ccefd88 | 2018-11-28 21:14:32 +0000 | [diff] [blame] | 31 | ; CHECK: !10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, scopeLine: 8, containingType: !4, virtualIndex: 10, thisAdjustment: 3, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: DISPFlagPureVirtual | DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !8, templateParams: !5, declaration: !9, retainedNodes: !6) |
Adrian Prantl | 4eeaa0d | 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 | 926ddae | 2016-08-17 16:02:43 +0000 | [diff] [blame] | 37 | virtualIndex: 10, thisAdjustment: 3, flags: DIFlagPrototyped | DIFlagNoReturn, |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 38 | isOptimized: true, unit: !8, templateParams: !5, |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 39 | declaration: !9, retainedNodes: !6) |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 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, |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 51 | retainedNodes: !6) |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 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, |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 62 | templateParams: !5, declaration: !9, retainedNodes: !6) |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 63 | |
Adrian Prantl | 1bf6297 | 2017-04-26 22:56:44 +0000 | [diff] [blame] | 64 | !13 = !{!4} |
| 65 | ; CHECK: !13 = !{!4} |
Paul Robinson | ccefd88 | 2018-11-28 21:14:32 +0000 | [diff] [blame] | 66 | ; CHECK: !14 = distinct !DISubprogram(name: "foo", scope: !1, file: !2, line: 1, type: !3, scopeLine: 2, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !8, thrownTypes: !13) |
Adrian Prantl | 1bf6297 | 2017-04-26 22:56:44 +0000 | [diff] [blame] | 67 | !14 = distinct !DISubprogram(name: "foo", scope: !1, |
| 68 | file: !2, line: 1, type: !3, isLocal: true, |
| 69 | isDefinition: true, scopeLine: 2, isOptimized: false, |
| 70 | unit: !8, thrownTypes: !13) |
| 71 | |
Paul Robinson | ccefd88 | 2018-11-28 21:14:32 +0000 | [diff] [blame] | 72 | ; CHECK: !15 = distinct !DISubprogram({{.*}}, flags: DIFlagPrototyped, spFlags: DISPFlagPureVirtual | DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, |
| 73 | !15 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, |
| 74 | file: !2, line: 7, type: !3, scopeLine: 8, |
| 75 | containingType: !4, virtualIndex: 0, |
| 76 | flags: DIFlagPrototyped, |
| 77 | spFlags: DISPFlagPureVirtual | DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, |
| 78 | unit: !8, templateParams: !5, declaration: !9, |
| 79 | retainedNodes: !6) |
| 80 | |
| 81 | !16 = !{i32 1, !"Debug Info Version", i32 3} |
| 82 | !llvm.module.flags = !{!16} |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 83 | !llvm.dbg.cu = !{!8} |