aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-27 06:44:45 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-27 06:44:45 +0000
commit38af06736e6d46ef3d417e40b9843ca1658fc8e7 (patch)
tree88b54325d96335cbc4e4b80e163003b2e80421f6 /test/MC
parent0ae07098f7d2ad5a1868d448d0b1b4eef2a3b091 (diff)
downloadexternal_llvm-38af06736e6d46ef3d417e40b9843ca1658fc8e7.zip
external_llvm-38af06736e6d46ef3d417e40b9843ca1658fc8e7.tar.gz
external_llvm-38af06736e6d46ef3d417e40b9843ca1658fc8e7.tar.bz2
Merging r195798:
------------------------------------------------------------------------ r195798 | rafael | 2013-11-26 17:18:37 -0800 (Tue, 26 Nov 2013) | 9 lines Use simple section names for COMDAT sections on COFF. With this patch we use simple names for COMDAT sections (like .text or .bss). This matches the MSVC behavior. When merging it is the COMDAT symbol that is used to decide if two sections should be merged, so there is no point in building a fancy name. This survived a bootstrap on mingw32. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/COFF/tricky-names.ll6
-rw-r--r--test/MC/COFF/weak-symbol.ll18
2 files changed, 9 insertions, 15 deletions
diff --git a/test/MC/COFF/tricky-names.ll b/test/MC/COFF/tricky-names.ll
index 6e041d3..458aa41 100644
--- a/test/MC/COFF/tricky-names.ll
+++ b/test/MC/COFF/tricky-names.ll
@@ -25,11 +25,11 @@ define weak i32 @"\01??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU
; ASM-NOT: .globl "@foo.bar"
; READOBJ: Symbol
-; READOBJ: Name: .text$??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51
-; READOBJ: Section: .text$??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51
+; READOBJ: Name: .text
+; READOBJ: Section: .text
; READOBJ: Symbol
; READOBJ: Name: ??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51
-; READOBJ: Section: .text$??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51
+; READOBJ: Section: .text
; READOBJ: Symbol
; READOBJ: Name: ??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ
; READOBJ: Symbol
diff --git a/test/MC/COFF/weak-symbol.ll b/test/MC/COFF/weak-symbol.ll
index 7f2e87c..f23063e 100644
--- a/test/MC/COFF/weak-symbol.ll
+++ b/test/MC/COFF/weak-symbol.ll
@@ -8,37 +8,31 @@
; RUN: llc -mtriple=x86_64-pc-mingw32 %s -o - | FileCheck %s --check-prefix=X64
; Mangled function
-; X86: .section .text$_Z3foo
-; X86: .linkonce discard
+; X86: .section .text,"xr",discard,__Z3foo
; X86: .globl __Z3foo
;
-; X64: .section .text$_Z3foo
-; X64: .linkonce discard
+; X64: .section .text,"xr",discard,_Z3foo
; X64: .globl _Z3foo
define weak void @_Z3foo() {
ret void
}
; Unmangled function
-; X86: .section .sect$f
-; X86: .linkonce discard
+; X86: .section .sect,"xr",discard,_f
; X86: .globl _f
;
-; X64: .section .sect$f
-; X64: .linkonce discard
+; X64: .section .sect,"xr",discard,f
; X64: .globl f
define weak void @f() section ".sect" {
ret void
}
; Weak global
-; X86: .section .data$a
-; X86: .linkonce discard
+; X86: .section .data,"r",discard,_a
; X86: .globl _a
; X86: .zero 12
;
-; X64: .section .data$a
-; X64: .linkonce discard
+; X64: .section .data,"r",discard,a
; X64: .globl a
; X64: .zero 12
@a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data"