1*9880d681SAndroid Build Coastguard Worker; REQUIRES: object-emission 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; Given the following source, ensure that the discriminator is emitted for 6*9880d681SAndroid Build Coastguard Worker; the inlined callsite. 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker;void xyz(); 9*9880d681SAndroid Build Coastguard Worker;static void __attribute__((always_inline)) bar() { xyz(); } 10*9880d681SAndroid Build Coastguard Worker;void foo() { 11*9880d681SAndroid Build Coastguard Worker; bar(); bar(); 12*9880d681SAndroid Build Coastguard Worker;} 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker;CHECK: DW_TAG_inlined_subroutine 15*9880d681SAndroid Build Coastguard Worker;CHECK-NOT: DW_AT_GNU_discriminator 16*9880d681SAndroid Build Coastguard Worker;CHECK: DW_TAG_inlined_subroutine 17*9880d681SAndroid Build Coastguard Worker;CHECK-NOT: {{DW_TAG|NULL}} 18*9880d681SAndroid Build Coastguard Worker;CHECK: DW_AT_GNU_discriminator{{.*}}0x01 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker; Function Attrs: uwtable 21*9880d681SAndroid Build Coastguard Workerdefine void @_Z3foov() #0 !dbg !4 { 22*9880d681SAndroid Build Coastguard Worker tail call void @_Z3xyzv(), !dbg !11 23*9880d681SAndroid Build Coastguard Worker tail call void @_Z3xyzv(), !dbg !13 24*9880d681SAndroid Build Coastguard Worker ret void, !dbg !16 25*9880d681SAndroid Build Coastguard Worker} 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerdeclare void @_Z3xyzv() #1 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Workerattributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 30*9880d681SAndroid Build Coastguard Workerattributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0} 33*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!8, !9} 34*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!10} 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 252497)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 37*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "a.cc", directory: "/tmp") 38*9880d681SAndroid Build Coastguard Worker!2 = !{} 39*9880d681SAndroid Build Coastguard Worker!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) 40*9880d681SAndroid Build Coastguard Worker!5 = !DISubroutineType(types: !6) 41*9880d681SAndroid Build Coastguard Worker!6 = !{null} 42*9880d681SAndroid Build Coastguard Worker!7 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) 43*9880d681SAndroid Build Coastguard Worker!8 = !{i32 2, !"Dwarf Version", i32 4} 44*9880d681SAndroid Build Coastguard Worker!9 = !{i32 2, !"Debug Info Version", i32 3} 45*9880d681SAndroid Build Coastguard Worker!10 = !{!"clang version 3.8.0 (trunk 252497)"} 46*9880d681SAndroid Build Coastguard Worker!11 = !DILocation(line: 2, column: 52, scope: !7, inlinedAt: !12) 47*9880d681SAndroid Build Coastguard Worker!12 = distinct !DILocation(line: 4, column: 3, scope: !4) 48*9880d681SAndroid Build Coastguard Worker!13 = !DILocation(line: 2, column: 52, scope: !7, inlinedAt: !14) 49*9880d681SAndroid Build Coastguard Worker!14 = distinct !DILocation(line: 4, column: 10, scope: !15) 50*9880d681SAndroid Build Coastguard Worker!15 = !DILexicalBlockFile(scope: !4, file: !1, discriminator: 1) 51*9880d681SAndroid Build Coastguard Worker!16 = !DILocation(line: 5, column: 1, scope: !4) 52