From cd94a7676a7f3a8b1c2ed42809b28d3319c671c1 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 15 Jan 2014 00:04:29 +0000 Subject: Make sure we emit a relocation to the debug_ranges section in the presence of CU ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199276 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/X86/cu-ranges.ll | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/DebugInfo') diff --git a/test/DebugInfo/X86/cu-ranges.ll b/test/DebugInfo/X86/cu-ranges.ll index 77561a4e63..e582ea7332 100644 --- a/test/DebugInfo/X86/cu-ranges.ll +++ b/test/DebugInfo/X86/cu-ranges.ll @@ -1,5 +1,6 @@ ; RUN: llc -split-dwarf=Enable -O0 %s -ffunction-sections -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck --check-prefix=FUNCTION-SECTIONS %s +; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=FUNCTION-SECTIONS-RELOCS %s ; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck --check-prefix=NO-FUNCTION-SECTIONS %s @@ -12,6 +13,9 @@ ; With function sections enabled make sure that we have a DW_AT_ranges attribute. ; FUNCTION-SECTIONS: DW_AT_ranges +; Check that we have a relocation against the .debug_ranges section. +; FUNCTION-SECTIONS-RELOCS: R_X86_64_32 .debug_ranges 0x0 + ; Without function sections enabled make sure that we have no DW_AT_ranges attribute. ; NO-FUNCTION-SECTIONS-NOT: DW_AT_ranges -- cgit v1.2.3