summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-02-19 01:28:30 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-02-19 01:28:30 +0000
commitfaaa5532749f4445dd6a02ad3be13472aaeae235 (patch)
tree7d300dbe47cbbed6e51ea20d02e6042afbf7295d /test/CodeGen
parent7a8ca279cde02a44bf8c77e20eac1bd5bdbf582b (diff)
downloadllvm-faaa5532749f4445dd6a02ad3be13472aaeae235.tar.gz
llvm-faaa5532749f4445dd6a02ad3be13472aaeae235.tar.bz2
llvm-faaa5532749f4445dd6a02ad3be13472aaeae235.tar.xz
Avoid an infinite cycle with private linkage and -f{data|function}-sections.
When outputting an object we check its section to find its name, but when looking for the section with -ffunction-section we look for the symbol name. Break the loop by requesting a name with the private prefix when constructing the section name. This matches the behavior before r201608. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/global-sections.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/global-sections.ll b/test/CodeGen/X86/global-sections.ll
index eaf7337214..c031821f9a 100644
--- a/test/CodeGen/X86/global-sections.ll
+++ b/test/CodeGen/X86/global-sections.ll
@@ -168,3 +168,11 @@
; DARWIN: .zerofill __DATA,__common,_G12,1,3
; DARWIN: .globl _G13
; DARWIN: .zerofill __DATA,__common,_G13,1,3
+
+@G14 = private unnamed_addr constant [4 x i8] c"foo\00", align 1
+
+; LINUX-SECTIONS: .type .LG14,@object # @G14
+; LINUX-SECTIONS: .section .rodata..LG14,"aMS",@progbits,1
+; LINUX-SECTIONS: .LG14:
+; LINUX-SECTIONS: .asciz "foo"
+; LINUX-SECTIONS: .size .LG14, 4