diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-07 04:28:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-07 04:28:09 +0000 |
commit | 98f15d27cda62ca2f973da0244b6b5e15f18acb7 (patch) | |
tree | 518be04e0118f9dfc2f9044c9cc426d77b1330c0 | |
parent | c2bf2bbe93c7ce44bedc8485cc24927423404835 (diff) | |
download | external_llvm-98f15d27cda62ca2f973da0244b6b5e15f18acb7.zip external_llvm-98f15d27cda62ca2f973da0244b6b5e15f18acb7.tar.gz external_llvm-98f15d27cda62ca2f973da0244b6b5e15f18acb7.tar.bz2 |
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97895 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 3b3be5d..d127f53 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -651,16 +651,16 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, } // FIXME: Alignment check should be handled by section classifier. - if (Kind.isMergeable1ByteCString() || - (Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage())) { - if (TM.getTargetData()->getPreferredAlignment( - cast<GlobalVariable>(GV)) < 32) { - if (Kind.isMergeable1ByteCString()) - return CStringSection; - assert(Kind.isMergeable2ByteCString()); - return UStringSection; - } - } + if (Kind.isMergeable1ByteCString() && + TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32) + return CStringSection; + + // Do not put 16-bit arrays in the UString section if they have an + // externally visible label, this runs into issues with certain linker + // versions. + if (Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage() && + TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32) + return UStringSection; if (Kind.isMergeableConst()) { if (Kind.isMergeableConst4()) |