blob: 2b8345b66b71c9b19bb5dae511b15a0efdcb816c [file] [log] [blame]
Rafael Espindola79278362011-11-10 22:34:29 +00001; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
Eli Benderskye6abe832013-01-25 21:44:53 +00002; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
Rafael Espindola79278362011-11-10 22:34:29 +00003
4; test that the DW_AT_specification is a back edge in the file.
5
Frederic Rissd1cfc3c2014-10-06 03:36:31 +00006; CHECK: DW_TAG_subprogram
Paul Robinson857b4432015-03-10 22:44:45 +00007; CHECK-NEXT: DW_AT_linkage_name {{.*}} "_ZN3foo3barEv"
David Blaikiece7a1bd2014-05-21 18:04:33 +00008; CHECK: DW_TAG_subprogram
David Blaikie6800e392014-06-24 20:10:27 +00009; CHECK-NOT: DW_TAG
Frederic Rissd1cfc3c2014-10-06 03:36:31 +000010; CHECK: DW_AT_specification {{.*}} "_ZN3foo3barEv"
Rafael Espindola79278362011-11-10 22:34:29 +000011
12
13@_ZZN3foo3barEvE1x = constant i32 0, align 4
14
Peter Collingbourned4bff302015-11-05 22:03:56 +000015define void @_ZN3foo3barEv() !dbg !5 {
Rafael Espindola79278362011-11-10 22:34:29 +000016entry:
17 ret void, !dbg !25
18}
19
20!llvm.dbg.cu = !{!0}
Manman Ren409558f2013-11-22 21:49:45 +000021!llvm.module.flags = !{!28}
Rafael Espindola79278362011-11-10 22:34:29 +000022
Duncan P. N. Exon Smith55ca9642015-08-03 17:26:41 +000023!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 Smithbe7ea192014-12-15 19:07:53 +000024!1 = !{}
25!3 = !{!5}
Peter Collingbourned4bff302015-11-05 22:03:56 +000026!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 Smitha9308c42015-04-29 16:38:44 +000027!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 Smithbe7ea192014-12-15 19:07:53 +000029!8 = !{null, !9}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000030!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 Smithbe7ea192014-12-15 19:07:53 +000034!13 = !{!11}
35!18 = !{!20}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000036!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 Smithe2741802015-03-03 17:24:31 +000042!28 = !{i32 1, !"Debug Info Version", i32 3}