summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/DarwinTargetAsmInfo.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-10-08 21:49:47 +0000
committerDale Johannesen <dalej@apple.com>2008-10-08 21:49:47 +0000
commit66e08292aa88db98c46ea0036c946efdc8e22374 (patch)
treec1467a0232d399a33a507631543f24a90fa9f56d /llvm/lib/Target/DarwinTargetAsmInfo.cpp
parent06c67f88d7c8460b31979a58ed398e993dae405c (diff)
downloadbcm5719-llvm-66e08292aa88db98c46ea0036c946efdc8e22374.tar.gz
bcm5719-llvm-66e08292aa88db98c46ea0036c946efdc8e22374.zip
(re)Put const weak strings in appropriate section on Darwin.
g++dg/abi/key2.C llvm-svn: 57309
Diffstat (limited to 'llvm/lib/Target/DarwinTargetAsmInfo.cpp')
-rw-r--r--llvm/lib/Target/DarwinTargetAsmInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
index 0e4b09adfef..20866d7617e 100644
--- a/llvm/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
@@ -43,6 +43,8 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) {
TextCoalSection =
getNamedSection("\t__TEXT,__textcoal_nt,coalesced,pure_instructions",
SectionFlags::Code);
+ ConstTextCoalSection = getNamedSection("\t__TEXT,__const_coal,coalesced",
+ SectionFlags::None);
ConstDataCoalSection = getNamedSection("\t__DATA,__const_coal,coalesced",
SectionFlags::None);
ConstDataSection = getUnnamedSection(".const_data", SectionFlags::None);
@@ -95,7 +97,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
(isNonStatic ? ConstDataSection : getReadOnlySection()));
case SectionKind::RODataMergeStr:
return (isWeak ?
- ConstDataCoalSection :
+ ConstTextCoalSection :
MergeableStringSection(cast<GlobalVariable>(GV)));
case SectionKind::RODataMergeConst:
return (isWeak ?
OpenPOWER on IntegriCloud