summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-25 05:34:24 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-25 05:34:24 +0000
commit9d5961d0d89b561be9ef91ea6cca81ef00672d17 (patch)
treef82aae669b29e5776fc4ba772ef22513cc7c194f /test
parentf50e7090434cf20bada71e7b9271c30fe3ca567c (diff)
downloadllvm-9d5961d0d89b561be9ef91ea6cca81ef00672d17.tar.gz
llvm-9d5961d0d89b561be9ef91ea6cca81ef00672d17.tar.bz2
llvm-9d5961d0d89b561be9ef91ea6cca81ef00672d17.tar.xz
DebugInfo: Add GNU_addr_base and GNU_ranges_base only when there are addresses or ranges
Based on code review feedback from Eric in r204672. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/DebugInfo/X86/fission-cu.ll3
-rw-r--r--test/DebugInfo/X86/fission-ranges.ll9
-rw-r--r--test/DebugInfo/empty.ll4
3 files changed, 13 insertions, 3 deletions
diff --git a/test/DebugInfo/X86/fission-cu.ll b/test/DebugInfo/X86/fission-cu.ll
index 543b787440..7f17698639 100644
--- a/test/DebugInfo/X86/fission-cu.ll
+++ b/test/DebugInfo/X86/fission-cu.ll
@@ -59,8 +59,6 @@
; CHECK-NEXT: DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
; CHECK-NEXT: DW_AT_GNU_dwo_name [DW_FORM_strp] ( .debug_str[0x00000000] = "baz.dwo")
; CHECK-NEXT: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000008] = "/usr/local/google/home/echristo/tmp")
-; CHECK-NEXT: DW_AT_GNU_addr_base [DW_FORM_sec_offset] (0x00000000)
-; CHECK-NEXT: DW_AT_GNU_ranges_base [DW_FORM_sec_offset] (0x00000000)
; CHECK-NEXT: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x1f1f859683d49324)
; Check that the rest of the compile units have information.
@@ -108,7 +106,6 @@
; OBJ-NEXT: R_X86_64_32 .debug_str
; OBJ-NEXT: R_X86_64_32 .debug_str
; OBJ-NEXT: R_X86_64_32 .debug_addr
-; OBJ-NEXT: R_X86_64_32 .debug_ranges
; OBJ-NEXT: }
; HDR-NOT: .debug_aranges
diff --git a/test/DebugInfo/X86/fission-ranges.ll b/test/DebugInfo/X86/fission-ranges.ll
index a48896f5a5..416e7cb2a2 100644
--- a/test/DebugInfo/X86/fission-ranges.ll
+++ b/test/DebugInfo/X86/fission-ranges.ll
@@ -2,6 +2,15 @@
; RUN: llvm-dwarfdump %t | FileCheck %s
; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s
+; CHECK: .debug_info contents:
+; CHECK: DW_TAG_compile_unit
+; CHECK-NEXT: DW_AT_stmt_list
+; CHECK-NEXT: DW_AT_GNU_dwo_name
+; CHECK-NEXT: DW_AT_comp_dir
+; CHECK-NEXT: DW_AT_GNU_dwo_id
+; CHECK-NEXT: DW_AT_GNU_addr_base [DW_FORM_sec_offset] (0x00000000)
+
+
; CHECK: .debug_info.dwo contents:
; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[A:0x[0-9a-z]*]])
; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[E:0x[0-9a-z]*]])
diff --git a/test/DebugInfo/empty.ll b/test/DebugInfo/empty.ll
index 1fb1816614..cf40523e7e 100644
--- a/test/DebugInfo/empty.ll
+++ b/test/DebugInfo/empty.ll
@@ -1,6 +1,7 @@
; REQUIRES: object-emission
; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s
+; RUN: %llc_dwarf -split-dwarf=Enable < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
; darwin has a workaround for a linker bug so it always emits one line table entry
; XFAIL: darwin
@@ -17,6 +18,9 @@
; CHECK: .debug_pubtypes contents:
; CHECK-NOT: Offset
+; Don't emit DW_AT_addr_base when there are no addresses.
+; FISSION-NOT: DW_AT_GNU_addr_base [DW_FORM_sec_offset]
+
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!5}