git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97895 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-07 04:28:09 +00:00
parent c2bf2bbe93
commit 98f15d27cd

View File

@@ -651,16 +651,16 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
} }
// FIXME: Alignment check should be handled by section classifier. // FIXME: Alignment check should be handled by section classifier.
if (Kind.isMergeable1ByteCString() || if (Kind.isMergeable1ByteCString() &&
(Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage())) { TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32)
if (TM.getTargetData()->getPreferredAlignment( return CStringSection;
cast<GlobalVariable>(GV)) < 32) {
if (Kind.isMergeable1ByteCString()) // Do not put 16-bit arrays in the UString section if they have an
return CStringSection; // externally visible label, this runs into issues with certain linker
assert(Kind.isMergeable2ByteCString()); // versions.
return UStringSection; if (Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage() &&
} TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32)
} return UStringSection;
if (Kind.isMergeableConst()) { if (Kind.isMergeableConst()) {
if (Kind.isMergeableConst4()) if (Kind.isMergeableConst4())