[llvm-commits] [llvm] r57309 - in /llvm/trunk: include/llvm/Target/DarwinTargetAsmInfo.h lib/Target/DarwinTargetAsmInfo.cpp

Dale Johannesen dalej at apple.com
Wed Oct 8 14:49:47 PDT 2008


Author: johannes
Date: Wed Oct  8 16:49:47 2008
New Revision: 57309

URL: http://llvm.org/viewvc/llvm-project?rev=57309&view=rev
Log:
(re)Put const weak strings in appropriate section on Darwin.
g++dg/abi/key2.C


Modified:
    llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h
    llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp

Modified: llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h?rev=57309&r1=57308&r2=57309&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h Wed Oct  8 16:49:47 2008
@@ -26,6 +26,7 @@
 
   struct DarwinTargetAsmInfo: public TargetAsmInfo {
     const Section* TextCoalSection;
+    const Section* ConstTextCoalSection;
     const Section* ConstDataCoalSection;
     const Section* ConstDataSection;
     const Section* DataCoalSection;

Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=57309&r1=57308&r2=57309&view=diff

==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Wed Oct  8 16:49:47 2008
@@ -43,6 +43,8 @@
   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 @@
             (isNonStatic ? ConstDataSection : getReadOnlySection()));
    case SectionKind::RODataMergeStr:
     return (isWeak ?
-            ConstDataCoalSection :
+            ConstTextCoalSection :
             MergeableStringSection(cast<GlobalVariable>(GV)));
    case SectionKind::RODataMergeConst:
     return (isWeak ?





More information about the llvm-commits mailing list