Home | History | Annotate | Download | only in Generic
      1 ; REQUIRES: object-emission
      2 
      3 ; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
      4 
      5 ; Given the following source, ensure that the discriminator is emitted for
      6 ; the inlined callsite.
      7 
      8 ;void xyz();
      9 ;static void __attribute__((always_inline)) bar() { xyz(); }
     10 ;void foo() {
     11 ;  bar(); bar();
     12 ;}
     13 
     14 ;CHECK: DW_TAG_inlined_subroutine
     15 ;CHECK-NOT: DW_AT_GNU_discriminator
     16 ;CHECK: DW_TAG_inlined_subroutine
     17 ;CHECK-NOT: {{DW_TAG|NULL}}
     18 ;CHECK: DW_AT_GNU_discriminator{{.*}}0x01
     19 
     20 ; Function Attrs: uwtable
     21 define void @_Z3foov() #0 !dbg !4 {
     22   tail call void @_Z3xyzv(), !dbg !11
     23   tail call void @_Z3xyzv(), !dbg !13
     24   ret void, !dbg !16
     25 }
     26 
     27 declare void @_Z3xyzv() #1
     28 
     29 attributes #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 attributes #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 
     32 !llvm.dbg.cu = !{!0}
     33 !llvm.module.flags = !{!8, !9}
     34 !llvm.ident = !{!10}
     35 
     36 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 252497)", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, subprograms: !3)
     37 !1 = !DIFile(filename: "a.cc", directory: "/tmp")
     38 !2 = !{}
     39 !3 = !{!4, !7}
     40 !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, variables: !2)
     41 !5 = !DISubroutineType(types: !6)
     42 !6 = !{null}
     43 !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, variables: !2)
     44 !8 = !{i32 2, !"Dwarf Version", i32 4}
     45 !9 = !{i32 2, !"Debug Info Version", i32 3}
     46 !10 = !{!"clang version 3.8.0 (trunk 252497)"}
     47 !11 = !DILocation(line: 2, column: 52, scope: !7, inlinedAt: !12)
     48 !12 = distinct !DILocation(line: 4, column: 3, scope: !4)
     49 !13 = !DILocation(line: 2, column: 52, scope: !7, inlinedAt: !14)
     50 !14 = distinct !DILocation(line: 4, column: 10, scope: !15)
     51 !15 = !DILexicalBlockFile(scope: !4, file: !1, discriminator: 1)
     52 !16 = !DILocation(line: 5, column: 1, scope: !4)
     53