[llvm-branch-commits] [llvm-branch] r107441 - in /llvm/branches/Apple/Morbo: ./ bindings/ada/llvm/ docs/ include/llvm-c/ include/llvm/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/AsmPrinter/ lib/Target/ lib/Target/ARM/ lib/Target/CppBackend/ lib/Target/XCore/AsmPrinter/ lib/Transforms/IPO/ lib/VMCore/ test/CodeGen/ARM/ test/CodeGen/PowerPC/ test/CodeGen/X86/ test/Feature/ tools/llvm-nm/ utils/buildit/

Bill Wendling isanbard at gmail.com
Thu Jul 1 15:41:20 PDT 2010


Author: void
Date: Thu Jul  1 17:41:20 2010
New Revision: 107441

URL: http://llvm.org/viewvc/llvm-project?rev=107441&view=rev
Log:
$ svn merge -c 107433 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r107433 into '.':
A    test/Feature/linker_private_linkages.ll
U    test/CodeGen/ARM/2009-08-23-linkerprivate.ll
U    test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll
U    test/CodeGen/X86/2009-08-23-linkerprivate.ll
U    include/llvm/GlobalValue.h
U    include/llvm-c/Core.h
U    docs/LangRef.html
U    bindings/ada/llvm/llvm.ads
U    tools/llvm-nm/llvm-nm.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
U    lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
U    lib/Target/Mangler.cpp
U    lib/Target/CppBackend/CPPBackend.cpp
U    lib/Bitcode/Reader/BitcodeReader.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp
U    lib/VMCore/AsmWriter.cpp
U    lib/VMCore/Core.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLLexer.cpp
U    lib/AsmParser/LLToken.h
U    lib/Transforms/IPO/MergeFunctions.cpp
$ svn merge -c 107440 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r107440 into '.':
G    lib/CodeGen/AsmPrinter/AsmPrinter.cpp


Added:
    llvm/branches/Apple/Morbo/test/Feature/linker_private_linkages.ll
      - copied unchanged from r107433, llvm/trunk/test/Feature/linker_private_linkages.ll
Modified:
    llvm/branches/Apple/Morbo/   (props changed)
    llvm/branches/Apple/Morbo/bindings/ada/llvm/llvm.ads
    llvm/branches/Apple/Morbo/docs/LangRef.html
    llvm/branches/Apple/Morbo/include/llvm-c/Core.h
    llvm/branches/Apple/Morbo/include/llvm/GlobalValue.h
    llvm/branches/Apple/Morbo/lib/AsmParser/LLLexer.cpp
    llvm/branches/Apple/Morbo/lib/AsmParser/LLParser.cpp
    llvm/branches/Apple/Morbo/lib/AsmParser/LLToken.h
    llvm/branches/Apple/Morbo/lib/Bitcode/Reader/BitcodeReader.cpp
    llvm/branches/Apple/Morbo/lib/Bitcode/Writer/BitcodeWriter.cpp
    llvm/branches/Apple/Morbo/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    llvm/branches/Apple/Morbo/lib/Target/ARM/ARMInstrFormats.td   (props changed)
    llvm/branches/Apple/Morbo/lib/Target/CppBackend/CPPBackend.cpp
    llvm/branches/Apple/Morbo/lib/Target/Mangler.cpp
    llvm/branches/Apple/Morbo/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
    llvm/branches/Apple/Morbo/lib/Transforms/IPO/MergeFunctions.cpp
    llvm/branches/Apple/Morbo/lib/VMCore/AsmWriter.cpp
    llvm/branches/Apple/Morbo/lib/VMCore/Core.cpp
    llvm/branches/Apple/Morbo/test/CodeGen/ARM/2009-08-23-linkerprivate.ll
    llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll
    llvm/branches/Apple/Morbo/test/CodeGen/X86/2009-08-23-linkerprivate.ll
    llvm/branches/Apple/Morbo/tools/llvm-nm/llvm-nm.cpp
    llvm/branches/Apple/Morbo/utils/buildit/build_llvm

Propchange: llvm/branches/Apple/Morbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  1 17:41:20 2010
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Hermes:96832,96835,96858,96870,96876,96879,104427,104930,104971
-/llvm/trunk:98602,98604,98612,98615-98616,98675,98686,98743-98744,98768,98773,98778,98780,98810,98835,98839,98845,98855,98862,98881,98920,98977,98980,99032-99033,99043,99196,99223,99263,99282-99284,99306,99319-99321,99324,99336,99378,99418,99423,99429,99440,99455,99463,99465,99469,99484,99490,99492-99494,99507,99524,99537,99539-99540,99544,99570,99575,99598,99620,99629-99630,99636,99671,99692,99695,99697,99699,99722,99816,99835-99836,99845-99846,99848,99850,99855,99879,99881-99883,99895,99899,99910,99916,99919,99952-99954,99957,99959,99974-99975,99982,99984-99986,99988-99989,99992-99993,99995,99997-99999,100016,100035,100037-100038,100042,100044,100056,100072,100074,100078,100081-100090,100092,100094-100095,100116,100134,100184,100209,100214-100218,100220-100221,100223-100225,100231,100250,100252,100257,100261,100304,100332,100353,100384,100454-100455,100457,100466,100478,100480,100487,100494,100497,100505,100521,100553,100568,100584,100592,100609-100610,100636,100710,100736
 ,100742,100751,100768-100769,100771,100781,100797,100804,100837,100867,100892,100936-100937,101011,101023,101075,101077,101079,101081,101085,101154,101158,101162,101165,101181,101190,101202,101282,101294,101303,101314-101315,101317,101331,101343,101383,101392,101420,101453,101604,101615,101629,101684-101686,101805,101845,101847,101851,101855,101870,101879,101897,101925,101930,101965,101971,101979,102111,102120,102192,102202,102225,102236-102237,102358,102366,102394,102396,102405,102421,102454-102456,102463,102467-102468,102470,102481,102486-102488,102492-102493,102504-102505,102508-102510,102513,102519,102524,102526,102531,102558,102646,102653,102655,102661-102662,102672,102743,102760,102770,102791,102948,102970,102980,103001,103126,103133,103233,103314,103356,103415,103419,103439,103451,103455,103459,103757,103798,103801-103802,103804,103808,103813,103824,103829,103928,103990,103995,104066,104182,104233,104236,104265,104274,104302,104338,104412,104419,104524,104531,104640,1
 04646,104649,104655-104656,104661,104664,104705-104706,104720,104722,104732,104737,104740,104785,104848,104858,104872,104884,104900,104967,105285,105292,105295,105360,105387,105490,105505,105741,105828-105829,105872,105948-105949,106005,106066,106075,106088,106243-106244,106270,106438-106439,106515-106516,106518,106569,106576,106582,106604,106611-106612,106772,106792,106862,106878,106895,106985,106989-106990,107025,107027,107059,107065,107085,107103,107228,107237
+/llvm/trunk:98602,98604,98612,98615-98616,98675,98686,98743-98744,98768,98773,98778,98780,98810,98835,98839,98845,98855,98862,98881,98920,98977,98980,99032-99033,99043,99196,99223,99263,99282-99284,99306,99319-99321,99324,99336,99378,99418,99423,99429,99440,99455,99463,99465,99469,99484,99490,99492-99494,99507,99524,99537,99539-99540,99544,99570,99575,99598,99620,99629-99630,99636,99671,99692,99695,99697,99699,99722,99816,99835-99836,99845-99846,99848,99850,99855,99879,99881-99883,99895,99899,99910,99916,99919,99952-99954,99957,99959,99974-99975,99982,99984-99986,99988-99989,99992-99993,99995,99997-99999,100016,100035,100037-100038,100042,100044,100056,100072,100074,100078,100081-100090,100092,100094-100095,100116,100134,100184,100209,100214-100218,100220-100221,100223-100225,100231,100250,100252,100257,100261,100304,100332,100353,100384,100454-100455,100457,100466,100478,100480,100487,100494,100497,100505,100521,100553,100568,100584,100592,100609-100610,100636,100710,100736
 ,100742,100751,100768-100769,100771,100781,100797,100804,100837,100867,100892,100936-100937,101011,101023,101075,101077,101079,101081,101085,101154,101158,101162,101165,101181,101190,101202,101282,101294,101303,101314-101315,101317,101331,101343,101383,101392,101420,101453,101604,101615,101629,101684-101686,101805,101845,101847,101851,101855,101870,101879,101897,101925,101930,101965,101971,101979,102111,102120,102192,102202,102225,102236-102237,102358,102366,102394,102396,102405,102421,102454-102456,102463,102467-102468,102470,102481,102486-102488,102492-102493,102504-102505,102508-102510,102513,102519,102524,102526,102531,102558,102646,102653,102655,102661-102662,102672,102743,102760,102770,102791,102948,102970,102980,103001,103126,103133,103233,103314,103356,103415,103419,103439,103451,103455,103459,103757,103798,103801-103802,103804,103808,103813,103824,103829,103928,103990,103995,104066,104182,104233,104236,104265,104274,104302,104338,104412,104419,104524,104531,104640,1
 04646,104649,104655-104656,104661,104664,104705-104706,104720,104722,104732,104737,104740,104785,104848,104858,104872,104884,104900,104967,105285,105292,105295,105360,105387,105490,105505,105741,105828-105829,105872,105948-105949,106005,106066,106075,106088,106243-106244,106270,106438-106439,106515-106516,106518,106569,106576,106582,106604,106611-106612,106772,106792,106862,106878,106895,106985,106989-106990,107025,107027,107059,107065,107085,107103,107112,107212,107228,107237,107433,107440
 /llvm-gcc-4.2/trunk:104182

Modified: llvm/branches/Apple/Morbo/bindings/ada/llvm/llvm.ads
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/bindings/ada/llvm/llvm.ads?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/bindings/ada/llvm/llvm.ads (original)
+++ llvm/branches/Apple/Morbo/bindings/ada/llvm/llvm.ads Thu Jul  1 17:41:20 2010
@@ -316,7 +316,8 @@
       LLVMExternalWeakLinkage,
       LLVMGhostLinkage,
       LLVMCommonLinkage,
-      LLVMLinkerPrivateLinkage);
+      LLVMLinkerPrivateLinkage,
+      LLVMLinkerPrivateWeakLinkage);
 
    for LLVMLinkage use
      (LLVMExternalLinkage            => 0,
@@ -333,7 +334,8 @@
       LLVMExternalWeakLinkage        => 11,
       LLVMGhostLinkage               => 12,
       LLVMCommonLinkage              => 13,
-      LLVMLinkerPrivateLinkage       => 14);
+      LLVMLinkerPrivateLinkage       => 14,
+      LLVMLinkerPrivateWeakLinkage   => 15);
 
    pragma Convention (C, LLVMLinkage);
 

Modified: llvm/branches/Apple/Morbo/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/docs/LangRef.html?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/docs/LangRef.html (original)
+++ llvm/branches/Apple/Morbo/docs/LangRef.html Thu Jul  1 17:41:20 2010
@@ -24,6 +24,7 @@
         <ol>
           <li><a href="#linkage_private">'<tt>private</tt>' Linkage</a></li>
           <li><a href="#linkage_linker_private">'<tt>linker_private</tt>' Linkage</a></li>
+          <li><a href="#linkage_linker_private_weak">'<tt>linker_private_weak</tt>' Linkage</a></li>
           <li><a href="#linkage_internal">'<tt>internal</tt>' Linkage</a></li>
           <li><a href="#linkage_available_externally">'<tt>available_externally</tt>' Linkage</a></li>
           <li><a href="#linkage_linkonce">'<tt>linkonce</tt>' Linkage</a></li>
@@ -544,20 +545,24 @@
 
 <dl>
   <dt><tt><b><a name="linkage_private">private</a></b></tt></dt>
-  <dd>Global values with private linkage are only directly accessible by objects
-      in the current module.  In particular, linking code into a module with an
-      private global value may cause the private to be renamed as necessary to
-      avoid collisions.  Because the symbol is private to the module, all
-      references can be updated. This doesn't show up in any symbol table in the
-      object file.</dd>
+  <dd>Global values with "<tt>private</tt>" linkage are only directly accessible
+      by objects in the current module. In particular, linking code into a
+      module with an private global value may cause the private to be renamed as
+      necessary to avoid collisions.  Because the symbol is private to the
+      module, all references can be updated. This doesn't show up in any symbol
+      table in the object file.</dd>
 
   <dt><tt><b><a name="linkage_linker_private">linker_private</a></b></tt></dt>
-  <dd>Similar to private, but the symbol is passed through the assembler and
-      removed by the linker after evaluation.  Note that (unlike private
-      symbols) linker_private symbols are subject to coalescing by the linker:
-      weak symbols get merged and redefinitions are rejected.  However, unlike
-      normal strong symbols, they are removed by the linker from the final
-      linked image (executable or dynamic library).</dd>
+  <dd>Similar to <tt>private</tt>, but the symbol is passed through the
+      assembler and evaluated by the linker. Unlike normal strong symbols, they
+      are removed by the linker from the final linked image (executable or
+      dynamic library).</dd>
+
+  <dt><tt><b><a name="linkage_linker_private_weak">linker_private_weak</a></b></tt></dt>
+  <dd>Similar to "<tt>linker_private</tt>", but the symbol is weak. Note that
+      <tt>linker_private_weak</tt> symbols are subject to coalescing by the
+      linker. The symbols are removed by the linker from the final linked image
+      (executable or dynamic library).</dd>
 
   <dt><tt><b><a name="linkage_internal">internal</a></b></tt></dt>
   <dd>Similar to private, but the value shows as a local symbol
@@ -621,8 +626,8 @@
   <dt><tt><b><a name="linkage_weak_odr">weak_odr</a></b></tt></dt>
   <dd>Some languages allow differing globals to be merged, such as two functions
       with different semantics.  Other languages, such as <tt>C++</tt>, ensure
-      that only equivalent globals are ever merged (the "one definition rule" -
-      "ODR").  Such languages can use the <tt>linkonce_odr</tt>
+      that only equivalent globals are ever merged (the "one definition rule"
+      — "ODR").  Such languages can use the <tt>linkonce_odr</tt>
       and <tt>weak_odr</tt> linkage types to indicate that the global will only
       be merged with equivalent globals.  These linkage types are otherwise the
       same as their non-<tt>odr</tt> versions.</dd>

Modified: llvm/branches/Apple/Morbo/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/include/llvm-c/Core.h?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/include/llvm-c/Core.h (original)
+++ llvm/branches/Apple/Morbo/include/llvm-c/Core.h Thu Jul  1 17:41:20 2010
@@ -226,7 +226,8 @@
   LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */
   LLVMGhostLinkage,       /**< Obsolete */
   LLVMCommonLinkage,      /**< Tentative definitions */
-  LLVMLinkerPrivateLinkage /**< Like Private, but linker removes. */
+  LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */
+  LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */
 } LLVMLinkage;
 
 typedef enum {

Modified: llvm/branches/Apple/Morbo/include/llvm/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/include/llvm/GlobalValue.h?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/include/llvm/GlobalValue.h (original)
+++ llvm/branches/Apple/Morbo/include/llvm/GlobalValue.h Thu Jul  1 17:41:20 2010
@@ -40,6 +40,7 @@
     InternalLinkage,    ///< Rename collisions when linking (static functions).
     PrivateLinkage,     ///< Like Internal, but omit from symbol table.
     LinkerPrivateLinkage, ///< Like Private, but linker removes.
+    LinkerPrivateWeakLinkage, ///< Like LinkerPrivate, but weak.
     DLLImportLinkage,   ///< Function to be imported from DLL
     DLLExportLinkage,   ///< Function to be accessible from DLL.
     ExternalWeakLinkage,///< ExternalWeak linkage description.
@@ -132,11 +133,14 @@
     return Linkage == PrivateLinkage;
   }
   static bool isLinkerPrivateLinkage(LinkageTypes Linkage) {
-    return Linkage==LinkerPrivateLinkage;
+    return Linkage == LinkerPrivateLinkage;
+  }
+  static bool isLinkerPrivateWeakLinkage(LinkageTypes Linkage) {
+    return Linkage == LinkerPrivateWeakLinkage;
   }
   static bool isLocalLinkage(LinkageTypes Linkage) {
     return isInternalLinkage(Linkage) || isPrivateLinkage(Linkage) ||
-      isLinkerPrivateLinkage(Linkage);
+      isLinkerPrivateLinkage(Linkage) || isLinkerPrivateWeakLinkage(Linkage);
   }
   static bool isDLLImportLinkage(LinkageTypes Linkage) {
     return Linkage == DLLImportLinkage;
@@ -158,7 +162,8 @@
     return (Linkage == WeakAnyLinkage ||
             Linkage == LinkOnceAnyLinkage ||
             Linkage == CommonLinkage ||
-            Linkage == ExternalWeakLinkage);
+            Linkage == ExternalWeakLinkage ||
+            Linkage == LinkerPrivateWeakLinkage);
   }
 
   /// isWeakForLinker - Whether the definition of this global may be replaced at
@@ -170,7 +175,8 @@
             Linkage == LinkOnceAnyLinkage ||
             Linkage == LinkOnceODRLinkage ||
             Linkage == CommonLinkage ||
-            Linkage == ExternalWeakLinkage);
+            Linkage == ExternalWeakLinkage ||
+            Linkage == LinkerPrivateWeakLinkage);
   }
 
   bool hasExternalLinkage() const { return isExternalLinkage(Linkage); }
@@ -187,6 +193,9 @@
   bool hasInternalLinkage() const { return isInternalLinkage(Linkage); }
   bool hasPrivateLinkage() const { return isPrivateLinkage(Linkage); }
   bool hasLinkerPrivateLinkage() const { return isLinkerPrivateLinkage(Linkage); }
+  bool hasLinkerPrivateWeakLinkage() const {
+    return isLinkerPrivateWeakLinkage(Linkage);
+  }
   bool hasLocalLinkage() const { return isLocalLinkage(Linkage); }
   bool hasDLLImportLinkage() const { return isDLLImportLinkage(Linkage); }
   bool hasDLLExportLinkage() const { return isDLLExportLinkage(Linkage); }

Modified: llvm/branches/Apple/Morbo/lib/AsmParser/LLLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/AsmParser/LLLexer.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/AsmParser/LLLexer.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/AsmParser/LLLexer.cpp Thu Jul  1 17:41:20 2010
@@ -492,6 +492,7 @@
 
   KEYWORD(private);
   KEYWORD(linker_private);
+  KEYWORD(linker_private_weak);
   KEYWORD(internal);
   KEYWORD(available_externally);
   KEYWORD(linkonce);

Modified: llvm/branches/Apple/Morbo/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/AsmParser/LLParser.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/AsmParser/LLParser.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/AsmParser/LLParser.cpp Thu Jul  1 17:41:20 2010
@@ -196,19 +196,20 @@
     // optional leading prefixes, the production is:
     // GlobalVar ::= OptionalLinkage OptionalVisibility OptionalThreadLocal
     //               OptionalAddrSpace ('constant'|'global') ...
-    case lltok::kw_private :       // OptionalLinkage
-    case lltok::kw_linker_private: // OptionalLinkage
-    case lltok::kw_internal:       // OptionalLinkage
-    case lltok::kw_weak:           // OptionalLinkage
-    case lltok::kw_weak_odr:       // OptionalLinkage
-    case lltok::kw_linkonce:       // OptionalLinkage
-    case lltok::kw_linkonce_odr:   // OptionalLinkage
-    case lltok::kw_appending:      // OptionalLinkage
-    case lltok::kw_dllexport:      // OptionalLinkage
-    case lltok::kw_common:         // OptionalLinkage
-    case lltok::kw_dllimport:      // OptionalLinkage
-    case lltok::kw_extern_weak:    // OptionalLinkage
-    case lltok::kw_external: {     // OptionalLinkage
+    case lltok::kw_private:             // OptionalLinkage
+    case lltok::kw_linker_private:      // OptionalLinkage
+    case lltok::kw_linker_private_weak: // OptionalLinkage
+    case lltok::kw_internal:            // OptionalLinkage
+    case lltok::kw_weak:                // OptionalLinkage
+    case lltok::kw_weak_odr:            // OptionalLinkage
+    case lltok::kw_linkonce:            // OptionalLinkage
+    case lltok::kw_linkonce_odr:        // OptionalLinkage
+    case lltok::kw_appending:           // OptionalLinkage
+    case lltok::kw_dllexport:           // OptionalLinkage
+    case lltok::kw_common:              // OptionalLinkage
+    case lltok::kw_dllimport:           // OptionalLinkage
+    case lltok::kw_extern_weak:         // OptionalLinkage
+    case lltok::kw_external: {          // OptionalLinkage
       unsigned Linkage, Visibility;
       if (ParseOptionalLinkage(Linkage) ||
           ParseOptionalVisibility(Visibility) ||
@@ -630,7 +631,8 @@
       Linkage != GlobalValue::WeakODRLinkage &&
       Linkage != GlobalValue::InternalLinkage &&
       Linkage != GlobalValue::PrivateLinkage &&
-      Linkage != GlobalValue::LinkerPrivateLinkage)
+      Linkage != GlobalValue::LinkerPrivateLinkage &&
+      Linkage != GlobalValue::LinkerPrivateWeakLinkage)
     return Error(LinkageLoc, "invalid linkage type for alias");
 
   Constant *Aliasee;
@@ -1014,11 +1016,13 @@
 ///   ::= /*empty*/
 ///   ::= 'private'
 ///   ::= 'linker_private'
+///   ::= 'linker_private_weak'
 ///   ::= 'internal'
 ///   ::= 'weak'
 ///   ::= 'weak_odr'
 ///   ::= 'linkonce'
 ///   ::= 'linkonce_odr'
+///   ::= 'available_externally'
 ///   ::= 'appending'
 ///   ::= 'dllexport'
 ///   ::= 'common'
@@ -1031,6 +1035,9 @@
   default:                       Res=GlobalValue::ExternalLinkage; return false;
   case lltok::kw_private:        Res = GlobalValue::PrivateLinkage;       break;
   case lltok::kw_linker_private: Res = GlobalValue::LinkerPrivateLinkage; break;
+  case lltok::kw_linker_private_weak:
+    Res = GlobalValue::LinkerPrivateWeakLinkage;
+    break;
   case lltok::kw_internal:       Res = GlobalValue::InternalLinkage;      break;
   case lltok::kw_weak:           Res = GlobalValue::WeakAnyLinkage;       break;
   case lltok::kw_weak_odr:       Res = GlobalValue::WeakODRLinkage;       break;
@@ -2686,6 +2693,7 @@
     break;
   case GlobalValue::PrivateLinkage:
   case GlobalValue::LinkerPrivateLinkage:
+  case GlobalValue::LinkerPrivateWeakLinkage:
   case GlobalValue::InternalLinkage:
   case GlobalValue::AvailableExternallyLinkage:
   case GlobalValue::LinkOnceAnyLinkage:

Modified: llvm/branches/Apple/Morbo/lib/AsmParser/LLToken.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/AsmParser/LLToken.h?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/AsmParser/LLToken.h (original)
+++ llvm/branches/Apple/Morbo/lib/AsmParser/LLToken.h Thu Jul  1 17:41:20 2010
@@ -37,9 +37,9 @@
     kw_declare, kw_define,
     kw_global,  kw_constant,
 
-    kw_private, kw_linker_private, kw_internal, kw_linkonce, kw_linkonce_odr,
-    kw_weak, kw_weak_odr, kw_appending, kw_dllimport, kw_dllexport, kw_common,
-    kw_available_externally,
+    kw_private, kw_linker_private, kw_linker_private_weak, kw_internal,
+    kw_linkonce, kw_linkonce_odr, kw_weak, kw_weak_odr, kw_appending,
+    kw_dllimport, kw_dllexport, kw_common, kw_available_externally,
     kw_default, kw_hidden, kw_protected,
     kw_extern_weak,
     kw_external, kw_thread_local,

Modified: llvm/branches/Apple/Morbo/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Bitcode/Reader/BitcodeReader.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul  1 17:41:20 2010
@@ -76,6 +76,7 @@
   case 11: return GlobalValue::LinkOnceODRLinkage;
   case 12: return GlobalValue::AvailableExternallyLinkage;
   case 13: return GlobalValue::LinkerPrivateLinkage;
+  case 14: return GlobalValue::LinkerPrivateWeakLinkage;
   }
 }
 

Modified: llvm/branches/Apple/Morbo/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Bitcode/Writer/BitcodeWriter.cpp Thu Jul  1 17:41:20 2010
@@ -313,6 +313,7 @@
   case GlobalValue::LinkOnceODRLinkage:         return 11;
   case GlobalValue::AvailableExternallyLinkage: return 12;
   case GlobalValue::LinkerPrivateLinkage:       return 13;
+  case GlobalValue::LinkerPrivateWeakLinkage:   return 14;
   }
 }
 

Modified: llvm/branches/Apple/Morbo/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul  1 17:41:20 2010
@@ -145,7 +145,7 @@
   case GlobalValue::LinkOnceODRLinkage:
   case GlobalValue::WeakAnyLinkage:
   case GlobalValue::WeakODRLinkage:
-  case GlobalValue::LinkerPrivateLinkage:
+  case GlobalValue::LinkerPrivateWeakLinkage:
     if (MAI->getWeakDefDirective() != 0) {
       // .globl _foo
       OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
@@ -177,6 +177,7 @@
     break;
   case GlobalValue::PrivateLinkage:
   case GlobalValue::InternalLinkage:
+  case GlobalValue::LinkerPrivateLinkage:
     break;
   default:
     llvm_unreachable("Unknown linkage type!");

Propchange: llvm/branches/Apple/Morbo/lib/Target/ARM/ARMInstrFormats.td
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  1 17:41:20 2010
@@ -1,2 +1,2 @@
 /llvm/branches/Apple/Hermes/lib/Target/ARM/ARMInstrFormats.td:104930
-/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td:98980,103126,103757,103928,104182,104233,104236,104265,104274,104302,104338,104412,104419,104524,104531,104640,104646,104649,104655-104656,104661,104664,104705-104706,104720,104722,104732,104737,104740,104785,104848,104858,104872,104884,104900,105092,105285,105292,105295,105360,105387,105490,105505,105741,105828-105829,105872,106066,106075,106088,106243-106244,106270,106438-106439,106515-106516,106518,106576,106582,106604,106611-106612,106772,106792,106862,106878,106895,106985,106989-106990,107025,107027,107059,107065,107085,107103,107228,107237
+/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td:98980,103126,103757,103928,104182,104233,104236,104265,104274,104302,104338,104412,104419,104524,104531,104640,104646,104649,104655-104656,104661,104664,104705-104706,104720,104722,104732,104737,104740,104785,104848,104858,104872,104884,104900,105092,105285,105292,105295,105360,105387,105490,105505,105741,105828-105829,105872,106066,106075,106088,106243-106244,106270,106438-106439,106515-106516,106518,106576,106582,106604,106611-106612,106772,106792,106862,106878,106895,106985,106989-106990,107025,107027,107059,107065,107085,107103,107112,107212,107228,107237,107433,107440

Modified: llvm/branches/Apple/Morbo/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/CppBackend/CPPBackend.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/CppBackend/CPPBackend.cpp Thu Jul  1 17:41:20 2010
@@ -287,6 +287,8 @@
       Out << "GlobalValue::PrivateLinkage"; break;
     case GlobalValue::LinkerPrivateLinkage:
       Out << "GlobalValue::LinkerPrivateLinkage"; break;
+    case GlobalValue::LinkerPrivateWeakLinkage:
+      Out << "GlobalValue::LinkerPrivateWeakLinkage"; break;
     case GlobalValue::AvailableExternallyLinkage:
       Out << "GlobalValue::AvailableExternallyLinkage "; break;
     case GlobalValue::LinkOnceAnyLinkage:

Modified: llvm/branches/Apple/Morbo/lib/Target/Mangler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/Mangler.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/Mangler.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/Mangler.cpp Thu Jul  1 17:41:20 2010
@@ -177,7 +177,7 @@
   ManglerPrefixTy PrefixTy = Mangler::Default;
   if (GV->hasPrivateLinkage() || isImplicitlyPrivate)
     PrefixTy = Mangler::Private;
-  else if (GV->hasLinkerPrivateLinkage())
+  else if (GV->hasLinkerPrivateLinkage() || GV->hasLinkerPrivateWeakLinkage())
     PrefixTy = Mangler::LinkerPrivate;
   
   // If this global has a name, handle it simply.

Modified: llvm/branches/Apple/Morbo/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Thu Jul  1 17:41:20 2010
@@ -152,7 +152,6 @@
     // FALL THROUGH
   case GlobalValue::InternalLinkage:
   case GlobalValue::PrivateLinkage:
-  case GlobalValue::LinkerPrivateLinkage:
     break;
   case GlobalValue::DLLImportLinkage:
     llvm_unreachable("DLLImport linkage is not supported by this target!");

Modified: llvm/branches/Apple/Morbo/lib/Transforms/IPO/MergeFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Transforms/IPO/MergeFunctions.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Transforms/IPO/MergeFunctions.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Transforms/IPO/MergeFunctions.cpp Thu Jul  1 17:41:20 2010
@@ -458,6 +458,7 @@
   case GlobalValue::WeakAnyLinkage:
   case GlobalValue::WeakODRLinkage:
   case GlobalValue::ExternalWeakLinkage:
+  case GlobalValue::LinkerPrivateWeakLinkage:
     return ExternalWeak;
 
   case GlobalValue::ExternalLinkage:

Modified: llvm/branches/Apple/Morbo/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/VMCore/AsmWriter.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/VMCore/AsmWriter.cpp Thu Jul  1 17:41:20 2010
@@ -1401,6 +1401,9 @@
   case GlobalValue::ExternalLinkage: break;
   case GlobalValue::PrivateLinkage:       Out << "private ";        break;
   case GlobalValue::LinkerPrivateLinkage: Out << "linker_private "; break;
+  case GlobalValue::LinkerPrivateWeakLinkage:
+    Out << "linker_private_weak ";
+    break;
   case GlobalValue::InternalLinkage:      Out << "internal ";       break;
   case GlobalValue::LinkOnceAnyLinkage:   Out << "linkonce ";       break;
   case GlobalValue::LinkOnceODRLinkage:   Out << "linkonce_odr ";   break;

Modified: llvm/branches/Apple/Morbo/lib/VMCore/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/VMCore/Core.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/VMCore/Core.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/VMCore/Core.cpp Thu Jul  1 17:41:20 2010
@@ -1054,6 +1054,8 @@
     return LLVMPrivateLinkage;
   case GlobalValue::LinkerPrivateLinkage:
     return LLVMLinkerPrivateLinkage;
+  case GlobalValue::LinkerPrivateWeakLinkage:
+    return LLVMLinkerPrivateWeakLinkage;
   case GlobalValue::DLLImportLinkage:
     return LLVMDLLImportLinkage;
   case GlobalValue::DLLExportLinkage:
@@ -1104,6 +1106,9 @@
   case LLVMLinkerPrivateLinkage:
     GV->setLinkage(GlobalValue::LinkerPrivateLinkage);
     break;
+  case LLVMLinkerPrivateWeakLinkage:
+    GV->setLinkage(GlobalValue::LinkerPrivateWeakLinkage);
+    break;
   case LLVMDLLImportLinkage:
     GV->setLinkage(GlobalValue::DLLImportLinkage);
     break;

Modified: llvm/branches/Apple/Morbo/test/CodeGen/ARM/2009-08-23-linkerprivate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/ARM/2009-08-23-linkerprivate.ll?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/ARM/2009-08-23-linkerprivate.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/ARM/2009-08-23-linkerprivate.ll Thu Jul  1 17:41:20 2010
@@ -2,7 +2,7 @@
 
 ; ModuleID = '/Volumes/MacOS9/tests/WebKit/JavaScriptCore/profiler/ProfilerServer.mm'
 
-@"\01l_objc_msgSend_fixup_alloc" = linker_private hidden global i32 0, section "__DATA, __objc_msgrefs, coalesced", align 16		; <i32*> [#uses=0]
+@"\01l_objc_msgSend_fixup_alloc" = linker_private_weak hidden global i32 0, section "__DATA, __objc_msgrefs, coalesced", align 16
 
 ; CHECK: .globl l_objc_msgSend_fixup_alloc
 ; CHECK: .weak_definition l_objc_msgSend_fixup_alloc

Modified: llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll Thu Jul  1 17:41:20 2010
@@ -2,7 +2,7 @@
 
 ; ModuleID = '/Volumes/MacOS9/tests/WebKit/JavaScriptCore/profiler/ProfilerServer.mm'
 
-@"\01l_objc_msgSend_fixup_alloc" = linker_private hidden global i32 0, section "__DATA, __objc_msgrefs, coalesced", align 16		; <i32*> [#uses=0]
+@"\01l_objc_msgSend_fixup_alloc" = linker_private_weak hidden global i32 0, section "__DATA, __objc_msgrefs, coalesced", align 16
 
 ; CHECK: .globl l_objc_msgSend_fixup_alloc
 ; CHECK: .weak_definition l_objc_msgSend_fixup_alloc

Modified: llvm/branches/Apple/Morbo/test/CodeGen/X86/2009-08-23-linkerprivate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/X86/2009-08-23-linkerprivate.ll?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/X86/2009-08-23-linkerprivate.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/X86/2009-08-23-linkerprivate.ll Thu Jul  1 17:41:20 2010
@@ -2,7 +2,7 @@
 
 ; ModuleID = '/Volumes/MacOS9/tests/WebKit/JavaScriptCore/profiler/ProfilerServer.mm'
 
-@"\01l_objc_msgSend_fixup_alloc" = linker_private hidden global i32 0, section "__DATA, __objc_msgrefs, coalesced", align 16		; <i32*> [#uses=0]
+@"\01l_objc_msgSend_fixup_alloc" = linker_private_weak hidden global i32 0, section "__DATA, __objc_msgrefs, coalesced", align 16
 
 ; CHECK: .globl l_objc_msgSend_fixup_alloc
 ; CHECK: .weak_definition l_objc_msgSend_fixup_alloc

Modified: llvm/branches/Apple/Morbo/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/tools/llvm-nm/llvm-nm.cpp?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/branches/Apple/Morbo/tools/llvm-nm/llvm-nm.cpp Thu Jul  1 17:41:20 2010
@@ -89,7 +89,8 @@
 static void DumpSymbolNameForGlobalValue(GlobalValue &GV) {
   // Private linkage and available_externally linkage don't exist in symtab.
   if (GV.hasPrivateLinkage() || GV.hasLinkerPrivateLinkage() ||
-      GV.hasAvailableExternallyLinkage()) return;
+      GV.hasLinkerPrivateWeakLinkage() || GV.hasAvailableExternallyLinkage())
+    return;
   
   const std::string SymbolAddrStr = "        "; // Not used yet...
   char TypeChar = TypeCharForSymbol(GV);

Modified: llvm/branches/Apple/Morbo/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/utils/buildit/build_llvm?rev=107441&r1=107440&r2=107441&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/utils/buildit/build_llvm (original)
+++ llvm/branches/Apple/Morbo/utils/buildit/build_llvm Thu Jul  1 17:41:20 2010
@@ -256,9 +256,12 @@
 
 if [ "x$LLVM_DEBUG" != "x1" ]; then
     # Strip local symbols from llvm libraries.
-    strip -S $DEST_DIR$DEST_ROOT/lib/*.[oa]
+    #
+    # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
+    # PPC objects!
+    strip -Sl $DEST_DIR$DEST_ROOT/lib/*.[oa]
     for f in `ls $DEST_DIR$DEST_ROOT/lib/*.so`; do
-        strip -Sx $f
+        strip -Sxl $f
     done
 fi
 
@@ -335,7 +338,10 @@
 if [ "$INSTALL_LIBLTO" = "yes" ]; then
   mkdir -p $DT_HOME/lib
   mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
-  strip -S $DT_HOME/lib/libLTO.dylib
+
+  # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
+  # PPC objects!
+  strip -arch all -Sl $DT_HOME/lib/libLTO.dylib
 fi
 rm -f lib/libLTO.a lib/libLTO.la
 
@@ -348,9 +354,12 @@
 find $DEST_DIR -name \*.dSYM -print | xargs rm -r || exit 1
 
 # Strip debugging information from files
+#
+# Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
+# PPC objects!
 find $DEST_DIR -perm -0111 -type f \
     ! \( -name '*.la' -o -name gccas -o -name gccld -o -name llvm-config \) \
-    -print | xargs -n 1 -P ${SYSCTL} strip -S
+    -print | xargs -n 1 -P ${SYSCTL} strip -arch all -Sl
 
 chgrp -h -R wheel $DEST_DIR
 chgrp -R wheel $DEST_DIR





More information about the llvm-branch-commits mailing list