brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 4b0993c Raw
50 lines · plain
1; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump -debug-info - | FileCheck %s2 3; Given the following source, ensure that the discriminator is emitted for4; the inlined callsite.5 6;void xyz();7;static void __attribute__((always_inline)) bar() { xyz(); }8;void foo() {9;  bar(); bar();10;}11 12;CHECK: DW_TAG_inlined_subroutine13;CHECK-NOT: DW_AT_GNU_discriminator14;CHECK: DW_TAG_inlined_subroutine15;CHECK-NOT: {{DW_TAG|NULL}}16;CHECK: DW_AT_GNU_discriminator{{.*}}0x0117 18; Function Attrs: uwtable19define void @_Z3foov() #0 !dbg !4 {20  tail call void @_Z3xyzv(), !dbg !1121  tail call void @_Z3xyzv(), !dbg !1322  ret void, !dbg !1623}24 25declare void @_Z3xyzv() #126 27attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }28attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }29 30!llvm.dbg.cu = !{!0}31!llvm.module.flags = !{!8, !9}32!llvm.ident = !{!10}33 34!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)35!1 = !DIFile(filename: "a.cc", directory: "/tmp")36!2 = !{}37!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, retainedNodes: !2)38!5 = !DISubroutineType(types: !6)39!6 = !{null}40!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, retainedNodes: !2)41!8 = !{i32 2, !"Dwarf Version", i32 4}42!9 = !{i32 2, !"Debug Info Version", i32 3}43!10 = !{!"clang version 3.8.0 (trunk 252497)"}44!11 = !DILocation(line: 2, column: 52, scope: !7, inlinedAt: !12)45!12 = distinct !DILocation(line: 4, column: 3, scope: !4)46!13 = !DILocation(line: 2, column: 52, scope: !7, inlinedAt: !14)47!14 = distinct !DILocation(line: 4, column: 10, scope: !15)48!15 = !DILexicalBlockFile(scope: !4, file: !1, discriminator: 1)49!16 = !DILocation(line: 5, column: 1, scope: !4)50