summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorRichard Mitton <richard@codersnotes.com>2013-10-03 22:07:08 +0000
committerRichard Mitton <richard@codersnotes.com>2013-10-03 22:07:08 +0000
commit7c9659a3b297be6298ffae4656b86797295c5d58 (patch)
treef181ed08efaa1a720a79b6989c47073ac54ad31f /test/DebugInfo
parent03e84c9df91cbc1fe0219a51109e260cacdfd2b7 (diff)
downloadllvm-7c9659a3b297be6298ffae4656b86797295c5d58.tar.gz
llvm-7c9659a3b297be6298ffae4656b86797295c5d58.tar.bz2
llvm-7c9659a3b297be6298ffae4656b86797295c5d58.tar.xz
Fixed a bug with section names containing special characters.
Changed the dwarf aranges code to not use getLabelEndName, as it turns out it's not reliable to call that given user-defined section names. Section names can have characters in that aren't representable as symbol names. The dwarf-aranges test case has been updated to include a special character, to check this. This fixes pr17416. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/X86/dwarf-aranges.ll61
-rw-r--r--test/DebugInfo/X86/multiple-aranges.ll2
2 files changed, 27 insertions, 36 deletions
diff --git a/test/DebugInfo/X86/dwarf-aranges.ll b/test/DebugInfo/X86/dwarf-aranges.ll
index a2f0059ed2..fc493c5008 100644
--- a/test/DebugInfo/X86/dwarf-aranges.ll
+++ b/test/DebugInfo/X86/dwarf-aranges.ll
@@ -1,47 +1,38 @@
-; RUN: llc < %s | FileCheck -check-prefix=CHECK-HEADER %s
-; RUN: llc < %s | FileCheck -check-prefix=CHECK-CODE %s
-; RUN: llc < %s | FileCheck -check-prefix=CHECK-DATA %s
-; RUN: llc < %s | FileCheck -check-prefix=CHECK-BSS %s
-; RUN: llc < %s | FileCheck -check-prefix=CHECK-CUSTOM %s
+; RUN: llc < %s | FileCheck %s
; -- header --
-; CHECK-HEADER: .short 2 # DWARF Arange version number
-; CHECK-HEADER-NEXT: .long .L.debug_info_begin0
-; CHECK-HEADER-NEXT: .byte 8 # Address Size (in bytes)
-; CHECK-HEADER-NEXT: .byte 0 # Segment Size (in bytes)
+; CHECK: .short 2 # DWARF Arange version number
+; CHECK-NEXT: .long .L.debug_info_begin0
+; CHECK-NEXT: .byte 8 # Address Size (in bytes)
+; CHECK-NEXT: .byte 0 # Segment Size (in bytes)
; -- alignment --
-; CHECK-HEADER-NEXT: .byte
-; CHECK-HEADER-NEXT: .byte
-; CHECK-HEADER-NEXT: .byte
-; CHECK-HEADER-NEXT: .byte
-; -- finish --
-; CHECK-HEADER: # ARange terminator
+; CHECK-NEXT: .byte
+; CHECK-NEXT: .byte
+; CHECK-NEXT: .byte
+; CHECK-NEXT: .byte
-; <text section> - it should have made one span covering all functions in this CU.
-; CHECK-CODE: .short 2 # DWARF Arange version number
-; CHECK-CODE: .quad .Lfunc_begin0
-; CHECK-CODE-NEXT: .Lset1 = .L.text_end-.Lfunc_begin0
-; CHECK-CODE: # ARange terminator
+; <common symbols> - it should have made one span for each symbol.
+; CHECK-NEXT: .quad some_bss
+; CHECK-NEXT: .quad 4
; <data section> - it should have made one span covering all vars in this CU.
-; CHECK-DATA: .short 2 # DWARF Arange version number
-; CHECK-DATA: .quad some_data
-; CHECK-DATA-NEXT: -some_data
-; CHECK-DATA: # ARange terminator
+; CHECK-NEXT: .quad some_data
+; CHECK-NEXT: .Lset0 = .Ldebug_end1-some_data
+; CHECK-NEXT: .quad .Lset0
-; <common symbols> - it should have made one span for each symbol.
-; CHECK-BSS: .short 2 # DWARF Arange version number
-; CHECK-BSS: .quad some_bss
-; CHECK-BSS-NEXT: .quad 4
-; CHECK-BSS: # ARange terminator
+; <text section> - it should have made one span covering all functions in this CU.
+; CHECK-NEXT: .quad .Lfunc_begin0
+; CHECK-NEXT: .Lset1 = .Ldebug_end2-.Lfunc_begin0
+; CHECK-NEXT: .quad .Lset1
; <other sections> - it should have made one span covering all vars in this CU.
-; CHECK-CUSTOM: .short 2 # DWARF Arange version number
-; CHECK-CUSTOM: .quad some_other
-; CHECK-CUSTOM-NEXT: -some_other
-; CHECK-CUSTOM: # ARange terminator
+; CHECK-NEXT: .quad some_other
+; CHECK-NEXT: .Lset2 = .Ldebug_end3-some_other
+; CHECK-NEXT: .quad .Lset2
+; -- finish --
+; CHECK-NEXT: # ARange terminator
@@ -50,7 +41,7 @@
;
; int some_data = 4;
; int some_bss;
-; int some_other __attribute__ ((section ("strangesection"))) = 5;
+; int some_other __attribute__ ((section ("strange+section"))) = 5;
;
; void some_code()
; {
@@ -60,7 +51,7 @@
target triple = "x86_64-unknown-linux-gnu"
@some_data = global i32 4, align 4
-@some_other = global i32 5, section "strangesection", align 4
+@some_other = global i32 5, section "strange+section", align 4
@some_bss = common global i32 0, align 4
define void @some_code() {
diff --git a/test/DebugInfo/X86/multiple-aranges.ll b/test/DebugInfo/X86/multiple-aranges.ll
index 08c4fa6684..28b99ee3ca 100644
--- a/test/DebugInfo/X86/multiple-aranges.ll
+++ b/test/DebugInfo/X86/multiple-aranges.ll
@@ -27,7 +27,7 @@
; CHECK-NEXT: .byte 255
; CHECK-NEXT: .byte 255
; CHECK-NEXT: .quad rainbows
-; CHECK-NEXT: .Lset1 = .L.data_end-rainbows
+; CHECK-NEXT: .Lset1 = .Ldebug_end0-rainbows
; CHECK-NEXT: .quad .Lset1
; CHECK-NEXT: .quad 0 # ARange terminator
; CHECK-NEXT: .quad 0