1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o %t.bc 2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %p/Inputs/pr26037.ll -o %t2.bc 3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link -S -only-needed %t2.bc %t.bc | FileCheck %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; CHECK: !DIImportedEntity({{.*}}, scope: ![[B:[0-9]+]], entity: ![[A:[0-9]+]] 6*9880d681SAndroid Build Coastguard Worker; CHECK: ![[B]] = distinct !DISubprogram(name: "b" 7*9880d681SAndroid Build Coastguard Worker; CHECK: ![[A]] = distinct !DISubprogram(name: "a" 8*9880d681SAndroid Build Coastguard Worker; CHECK: !DIImportedEntity({{.*}}, scope: ![[LBC:[0-9]+]], entity: ![[LBD:[0-9]+]] 9*9880d681SAndroid Build Coastguard Worker; CHECK: ![[LBC]] = distinct !DILexicalBlock(scope: ![[C:[0-9]+]] 10*9880d681SAndroid Build Coastguard Worker; CHECK: ![[C]] = distinct !DISubprogram(name: "c" 11*9880d681SAndroid Build Coastguard Worker; CHECK: ![[LBD]] = distinct !DILexicalBlock(scope: ![[D:[0-9]+]] 12*9880d681SAndroid Build Coastguard Worker; CHECK: ![[D]] = distinct !DISubprogram(name: "d" 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Workerdefine void @_ZN1A1aEv() #0 !dbg !4 { 15*9880d681SAndroid Build Coastguard Workerentry: 16*9880d681SAndroid Build Coastguard Worker ret void, !dbg !14 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdefine void @_ZN1A1bEv() #0 !dbg !8 { 20*9880d681SAndroid Build Coastguard Workerentry: 21*9880d681SAndroid Build Coastguard Worker ret void, !dbg !15 22*9880d681SAndroid Build Coastguard Worker} 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Workerdefine void @_ZN1A1cEv() #0 !dbg !18 { 25*9880d681SAndroid Build Coastguard Workerentry: 26*9880d681SAndroid Build Coastguard Worker ret void, !dbg !21 27*9880d681SAndroid Build Coastguard Worker} 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Workerdefine void @_ZN1A1dEv() #0 !dbg !20 { 30*9880d681SAndroid Build Coastguard Workerentry: 31*9880d681SAndroid Build Coastguard Worker ret void, !dbg !22 32*9880d681SAndroid Build Coastguard Worker} 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0} 35*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!11, !12} 36*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!13} 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !9) 39*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "a2.cc", directory: "") 40*9880d681SAndroid Build Coastguard Worker!2 = !{} 41*9880d681SAndroid Build Coastguard Worker!4 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEv", scope: !5, file: !1, line: 7, type: !6, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 42*9880d681SAndroid Build Coastguard Worker!5 = !DINamespace(name: "A", scope: null, file: !1, line: 1) 43*9880d681SAndroid Build Coastguard Worker!6 = !DISubroutineType(types: !7) 44*9880d681SAndroid Build Coastguard Worker!7 = !{null} 45*9880d681SAndroid Build Coastguard Worker!8 = distinct !DISubprogram(name: "b", linkageName: "_ZN1A1bEv", scope: !5, file: !1, line: 8, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 46*9880d681SAndroid Build Coastguard Worker!9 = !{!10, !16} 47*9880d681SAndroid Build Coastguard Worker!10 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !4, line: 8) 48*9880d681SAndroid Build Coastguard Worker!11 = !{i32 2, !"Dwarf Version", i32 4} 49*9880d681SAndroid Build Coastguard Worker!12 = !{i32 2, !"Debug Info Version", i32 3} 50*9880d681SAndroid Build Coastguard Worker!13 = !{!"clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)"} 51*9880d681SAndroid Build Coastguard Worker!14 = !DILocation(line: 7, column: 12, scope: !4) 52*9880d681SAndroid Build Coastguard Worker!15 = !DILocation(line: 8, column: 24, scope: !8) 53*9880d681SAndroid Build Coastguard Worker!16 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !17, entity: !19, line: 8) 54*9880d681SAndroid Build Coastguard Worker!17 = distinct !DILexicalBlock(scope: !18, file: !1, line: 9, column: 8) 55*9880d681SAndroid Build Coastguard Worker!18 = distinct !DISubprogram(name: "c", linkageName: "_ZN1A1cEv", scope: !5, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 56*9880d681SAndroid Build Coastguard Worker!19 = distinct !DILexicalBlock(scope: !20, file: !1, line: 10, column: 8) 57*9880d681SAndroid Build Coastguard Worker!20 = distinct !DISubprogram(name: "d", linkageName: "_ZN1A1dEv", scope: !5, file: !1, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 58*9880d681SAndroid Build Coastguard Worker!21 = !DILocation(line: 9, column: 8, scope: !18) 59*9880d681SAndroid Build Coastguard Worker!22 = !DILocation(line: 10, column: 8, scope: !20) 60