1; RUN: llc -mtriple=x86_64-macosx %s -o %t -filetype=obj 2; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s 3 4; CHECK: DW_TAG_subprogram [9] * 5; CHECK-NOT: DW_AT_{{(MIPS_)?}}linkage_name 6; CHECK: DW_AT_specification 7 8%class.A = type { i8 } 9 10@a = global %class.A zeroinitializer, align 1 11 12define i32 @_ZN1A1aEi(%class.A* %this, i32 %b) nounwind uwtable ssp align 2 !dbg !5 { 13entry: 14 %this.addr = alloca %class.A*, align 8 15 %b.addr = alloca i32, align 4 16 store %class.A* %this, %class.A** %this.addr, align 8 17 call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !21, metadata !DIExpression()), !dbg !23 18 store i32 %b, i32* %b.addr, align 4 19 call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !24, metadata !DIExpression()), !dbg !25 20 %this1 = load %class.A*, %class.A** %this.addr 21 %0 = load i32, i32* %b.addr, align 4, !dbg !26 22 ret i32 %0, !dbg !26 23} 24 25declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone 26 27!llvm.dbg.cu = !{!0} 28!llvm.module.flags = !{!29} 29 30!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 152691) (llvm/trunk 152692)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, globals: !18, imports: !1) 31!1 = !{} 32!5 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !6, scope: null, type: !7, declaration: !13) 33!6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo") 34!7 = !DISubroutineType(types: !8) 35!8 = !{!9, !10, !9} 36!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 37!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !11) 38!11 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 8, align: 8, file: !28, elements: !12) 39!12 = !{!13} 40!13 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, file: !6, scope: !11, type: !7) 41!18 = !{!20} 42!20 = !DIGlobalVariable(name: "a", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11, variable: %class.A* @a) 43!21 = !DILocalVariable(name: "this", line: 5, arg: 1, flags: DIFlagArtificial, scope: !5, file: !6, type: !22) 44!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11) 45!23 = !DILocation(line: 5, column: 8, scope: !5) 46!24 = !DILocalVariable(name: "b", line: 5, arg: 2, scope: !5, file: !6, type: !9) 47!25 = !DILocation(line: 5, column: 14, scope: !5) 48!26 = !DILocation(line: 6, column: 4, scope: !27) 49!27 = distinct !DILexicalBlock(line: 5, column: 17, file: !6, scope: !5) 50!28 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo") 51!29 = !{i32 1, !"Debug Info Version", i32 3} 52