aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/X86TargetAsmInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index ec9864074f..965e8d6b77 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -263,9 +263,13 @@ X86DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
case SectionKind::ROData:
return (isWeak ? ConstDataCoalSection : getReadOnlySection_());
case SectionKind::RODataMergeStr:
- return MergeableStringSection(cast<GlobalVariable>(GV));
+ return (isWeak ?
+ ConstDataCoalSection :
+ MergeableStringSection(cast<GlobalVariable>(GV)));
case SectionKind::RODataMergeConst:
- return MergeableConstSection(cast<GlobalVariable>(GV));
+ return (isWeak ?
+ ConstDataCoalSection:
+ MergeableConstSection(cast<GlobalVariable>(GV)));
default:
assert(0 && "Unsuported section kind for global");
}