Rafael Espindola | 7927836 | 2011-11-10 22:34:29 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj |
Eli Bendersky | e6abe83 | 2013-01-25 21:44:53 +0000 | [diff] [blame] | 2 | ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s |
Rafael Espindola | 7927836 | 2011-11-10 22:34:29 +0000 | [diff] [blame] | 3 | |
| 4 | ; test that the DW_AT_specification is a back edge in the file. |
| 5 | |
Frederic Riss | d1cfc3c | 2014-10-06 03:36:31 +0000 | [diff] [blame] | 6 | ; CHECK: DW_TAG_subprogram |
Paul Robinson | 857b443 | 2015-03-10 22:44:45 +0000 | [diff] [blame] | 7 | ; CHECK-NEXT: DW_AT_linkage_name {{.*}} "_ZN3foo3barEv" |
David Blaikie | ce7a1bd | 2014-05-21 18:04:33 +0000 | [diff] [blame] | 8 | ; CHECK: DW_TAG_subprogram |
David Blaikie | 6800e39 | 2014-06-24 20:10:27 +0000 | [diff] [blame] | 9 | ; CHECK-NOT: DW_TAG |
Frederic Riss | d1cfc3c | 2014-10-06 03:36:31 +0000 | [diff] [blame] | 10 | ; CHECK: DW_AT_specification {{.*}} "_ZN3foo3barEv" |
Rafael Espindola | 7927836 | 2011-11-10 22:34:29 +0000 | [diff] [blame] | 11 | |
| 12 | |
| 13 | @_ZZN3foo3barEvE1x = constant i32 0, align 4 |
| 14 | |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 15 | define void @_ZN3foo3barEv() !dbg !5 { |
Rafael Espindola | 7927836 | 2011-11-10 22:34:29 +0000 | [diff] [blame] | 16 | entry: |
| 17 | ret void, !dbg !25 |
| 18 | } |
| 19 | |
| 20 | !llvm.dbg.cu = !{!0} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 21 | !llvm.module.flags = !{!28} |
Rafael Espindola | 7927836 | 2011-11-10 22:34:29 +0000 | [diff] [blame] | 22 | |
Duncan P. N. Exon Smith | 55ca964 | 2015-08-03 17:26:41 +0000 | [diff] [blame] | 23 | !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: 0, file: !27, enums: !1, retainedTypes: !1, subprograms: !3, globals: !18, imports: !1) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 24 | !1 = !{} |
| 25 | !3 = !{!5} |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 26 | !5 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !6, scope: null, type: !7, declaration: !11) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 27 | !6 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library") |
| 28 | !7 = !DISubroutineType(types: !8) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 29 | !8 = !{null, !9} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 30 | !9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !10) |
| 31 | !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, flags: DIFlagFwdDecl, file: !27) |
| 32 | !11 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: !12, type: !7) |
| 33 | !12 = !DICompositeType(tag: DW_TAG_class_type, name: "foo", line: 1, size: 8, align: 8, file: !27, elements: !13) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 34 | !13 = !{!11} |
| 35 | !18 = !{!20} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 36 | !20 = !DIGlobalVariable(name: "x", line: 5, isLocal: true, isDefinition: true, scope: !5, file: !6, type: !21, variable: i32* @_ZZN3foo3barEvE1x) |
| 37 | !21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !22) |
| 38 | !22 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 39 | !25 = !DILocation(line: 6, column: 1, scope: !26) |
| 40 | !26 = distinct !DILexicalBlock(line: 4, column: 17, file: !6, scope: !5) |
| 41 | !27 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library") |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 42 | !28 = !{i32 1, !"Debug Info Version", i32 3} |