1a39794b0SDevang Patel; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj 2*16aa4cf7SAdrian Prantl; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s 3a39794b0SDevang Patel 4a39794b0SDevang Patel; test that the DW_AT_specification is a back edge in the file. 5a39794b0SDevang Patel 6d1cfc3c7SFrederic Riss; CHECK: DW_TAG_subprogram 7857b4434SPaul Robinson; CHECK-NEXT: DW_AT_linkage_name {{.*}} "_ZN3foo3barEv" 8ce7a1bd0SDavid Blaikie; CHECK: DW_TAG_subprogram 96800e398SDavid Blaikie; CHECK-NOT: DW_TAG 10d1cfc3c7SFrederic Riss; CHECK: DW_AT_specification {{.*}} "_ZN3foo3barEv" 11a39794b0SDevang Patel 121eadba1cSAdrian Prantlsource_filename = "test/DebugInfo/X86/DW_AT_specification.ll" 13a39794b0SDevang Patel 141eadba1cSAdrian Prantl@_ZZN3foo3barEvE1x = constant i32 0, align 4, !dbg !0 15a39794b0SDevang Patel 161eadba1cSAdrian Prantldefine void @_ZN3foo3barEv() !dbg !2 { 17a39794b0SDevang Patelentry: 181eadba1cSAdrian Prantl ret void, !dbg !17 19a39794b0SDevang Patel} 20a39794b0SDevang Patel 211eadba1cSAdrian Prantl!llvm.dbg.cu = !{!8} 221eadba1cSAdrian Prantl!llvm.module.flags = !{!16} 23a39794b0SDevang Patel 2405782218SAdrian Prantl!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 251eadba1cSAdrian Prantl!1 = !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 5, type: !14, isLocal: true, isDefinition: true) 261eadba1cSAdrian Prantl!2 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", scope: null, file: !3, line: 4, type: !4, isLocal: false, isDefinition: true, scopeLine: 4, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !8, declaration: !11) 271eadba1cSAdrian Prantl!3 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library") 281eadba1cSAdrian Prantl!4 = !DISubroutineType(types: !5) 291eadba1cSAdrian Prantl!5 = !{null, !6} 301eadba1cSAdrian Prantl!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64, flags: DIFlagArtificial) 311eadba1cSAdrian Prantl!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !3, line: 1, flags: DIFlagFwdDecl) 321eadba1cSAdrian Prantl!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.0 ()", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !9, globals: !10, imports: !9) 331eadba1cSAdrian Prantl!9 = !{} 341eadba1cSAdrian Prantl!10 = !{!0} 351eadba1cSAdrian Prantl!11 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", scope: !12, file: !3, line: 2, type: !4, isLocal: false, isDefinition: false, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false) 361eadba1cSAdrian Prantl!12 = !DICompositeType(tag: DW_TAG_class_type, name: "foo", file: !3, line: 1, size: 8, align: 8, elements: !13) 37be7ea19bSDuncan P. N. Exon Smith!13 = !{!11} 381eadba1cSAdrian Prantl!14 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !15) 391eadba1cSAdrian Prantl!15 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 401eadba1cSAdrian Prantl!16 = !{i32 1, !"Debug Info Version", i32 3} 411eadba1cSAdrian Prantl!17 = !DILocation(line: 6, column: 1, scope: !18) 421eadba1cSAdrian Prantl!18 = distinct !DILexicalBlock(scope: !2, file: !3, line: 4, column: 17) 431eadba1cSAdrian Prantl 44