From c9ad9191a7bcd98418c0e18f1df0d5ffba7496f4 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 7 Oct 2015 00:04:16 +0000 Subject: DebugInfo: Include the decl_line/decl_file in subprogram definitions if they differ from those in the declaration This is handy for some AutoFDO stuff, and seems like a minor improvement to correctness (otherwise a debug info consumer might think the decl line/file of the def was the same as that of the declaration - though what a consumer might use that for, I'm not sure - maybe "list " would've misbehaved with the old behavior?) and at a minor cost (in my experiment, with fission, without type units, without compression, 0.01% growth in debug info in the executable/objects, 0.02% growth in the .dwo files). llvm-svn: 249487 --- llvm/test/DebugInfo/X86/concrete_out_of_line.ll | 2 ++ llvm/test/DebugInfo/X86/dwarf-public-names.ll | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/test/DebugInfo/X86') diff --git a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll index e33edc53db6..173fa11dbfe 100644 --- a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll +++ b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll @@ -18,12 +18,14 @@ ; CHECK: DW_AT_name {{.*}} "~nsAutoRefCnt" ; CHECK: DW_TAG_subprogram +; CHECK-NEXT: DW_AT_decl_line {{.*}}18 ; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D2 ; CHECK-NEXT: DW_AT_specification {{.*}} "~nsAutoRefCnt" ; CHECK-NEXT: DW_AT_inline ; CHECK-NOT: DW_AT ; CHECK: DW_TAG ; CHECK: DW_TAG_subprogram +; CHECK-NEXT: DW_AT_decl_line {{.*}}18 ; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D1 ; CHECK-NEXT: DW_AT_specification {{.*}} "~nsAutoRefCnt" ; CHECK-NEXT: DW_AT_inline diff --git a/llvm/test/DebugInfo/X86/dwarf-public-names.ll b/llvm/test/DebugInfo/X86/dwarf-public-names.ll index 9aed55276b5..f63f98438c5 100644 --- a/llvm/test/DebugInfo/X86/dwarf-public-names.ll +++ b/llvm/test/DebugInfo/X86/dwarf-public-names.ll @@ -43,7 +43,7 @@ ; Skip the output to the header of the pubnames section. ; LINUX: debug_pubnames -; LINUX-NEXT: unit_size = 0x00000128 +; LINUX-NEXT: unit_size = 0x0000012a ; Check for each name in the output. ; LINUX-DAG: "ns" -- cgit v1.2.3