summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-12-30 05:25:49 +0000
committerEric Christopher <echristo@gmail.com>2013-12-30 05:25:49 +0000
commit782b70f4b3f1ba68ec26ed99a1a5c095adf80298 (patch)
tree0dde296ca86882681f44d0b17f771c575326008a /test/DebugInfo
parent8e58e03822fc0aae8c1fb335611315f897ab0962 (diff)
downloadllvm-782b70f4b3f1ba68ec26ed99a1a5c095adf80298.tar.gz
llvm-782b70f4b3f1ba68ec26ed99a1a5c095adf80298.tar.bz2
llvm-782b70f4b3f1ba68ec26ed99a1a5c095adf80298.tar.xz
Fix aranges and split dwarf by ensuring that the symbol and relocation
back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo. Do this by adding a method to grab a forwarded on local sym and local section by querying the skeleton if one exists and using that. Add a few tests to verify the relocations are back to the correct section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/X86/arange.ll5
-rw-r--r--test/DebugInfo/X86/fission-cu.ll3
2 files changed, 8 insertions, 0 deletions
diff --git a/test/DebugInfo/X86/arange.ll b/test/DebugInfo/X86/arange.ll
index fd0d0a3e08..819f9863bc 100644
--- a/test/DebugInfo/X86/arange.ll
+++ b/test/DebugInfo/X86/arange.ll
@@ -1,6 +1,7 @@
; REQUIRES: object-emission
; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=aranges - | FileCheck %s
+; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-readobj --relocations - | FileCheck --check-prefix=OBJ %s
; extern int i;
; template<int *x>
@@ -15,6 +16,10 @@
; CHECK-NEXT: [0x
; CHECK-NOT: [0x
+; Check that we have a relocation back to the debug_info section from the debug_aranges section
+; OBJ: debug_aranges
+; OBJ-NEXT: R_X86_64_32 .debug_info 0x0
+
%struct.foo = type { i8 }
@f = global %struct.foo zeroinitializer, align 1
diff --git a/test/DebugInfo/X86/fission-cu.ll b/test/DebugInfo/X86/fission-cu.ll
index 1d0ec27af0..135c78029a 100644
--- a/test/DebugInfo/X86/fission-cu.ll
+++ b/test/DebugInfo/X86/fission-cu.ll
@@ -112,4 +112,7 @@
; OBJ-NEXT: R_X86_64_32 .debug_str
; OBJ-NEXT: R_X86_64_64 .text 0x0
; OBJ-NEXT: }
+; OBJ: .debug_aranges
+; OBJ-NEXT: R_X86_64_32 .debug_info 0x0
+
!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}