From f56c2f7a4b03ccb469ac902bed40981cc4ff3b66 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 9 Jul 2008 19:06:02 +0000 Subject: [PATCH] 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 --- lib/Target/X86/X86TargetAsmInfo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index ec9864074f8..965e8d6b77a 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(GV)); + return (isWeak ? + ConstDataCoalSection : + MergeableStringSection(cast(GV))); case SectionKind::RODataMergeConst: - return MergeableConstSection(cast(GV)); + return (isWeak ? + ConstDataCoalSection: + MergeableConstSection(cast(GV))); default: assert(0 && "Unsuported section kind for global"); } -- 2.34.1