Weak stuff always goes to coalesced sections on Darwin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2008-07-09 19:06:02 +00:00
parent 4b9235b149
commit f56c2f7a4b

View File

@ -263,9 +263,13 @@ X86DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
case SectionKind::ROData: case SectionKind::ROData:
return (isWeak ? ConstDataCoalSection : getReadOnlySection_()); return (isWeak ? ConstDataCoalSection : getReadOnlySection_());
case SectionKind::RODataMergeStr: case SectionKind::RODataMergeStr:
return MergeableStringSection(cast<GlobalVariable>(GV)); return (isWeak ?
ConstDataCoalSection :
MergeableStringSection(cast<GlobalVariable>(GV)));
case SectionKind::RODataMergeConst: case SectionKind::RODataMergeConst:
return MergeableConstSection(cast<GlobalVariable>(GV)); return (isWeak ?
ConstDataCoalSection:
MergeableConstSection(cast<GlobalVariable>(GV)));
default: default:
assert(0 && "Unsuported section kind for global"); assert(0 && "Unsuported section kind for global");
} }