The "linker_private_weak*" linkages should set the LTO_SYMBOL_DEFINITION_WEAK
authorBill Wendling <isanbard@gmail.com>
Mon, 27 Sep 2010 18:05:19 +0000 (18:05 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 27 Sep 2010 18:05:19 +0000 (18:05 +0000)
during LTO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114850 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lto/LTOModule.cpp

index c7cd585d03ddf1b1affd989c8f2b787e88b7dbac..fc028a27c5d0e9374a06473bbf1475e43a19655d 100644 (file)
@@ -325,7 +325,9 @@ void LTOModule::addDefinedSymbol(GlobalValue *def, Mangler &mangler,
   }
 
   // set definition part
-  if (def->hasWeakLinkage() || def->hasLinkOnceLinkage()) {
+  if (def->hasWeakLinkage() || def->hasLinkOnceLinkage() ||
+      def->hasLinkerPrivateWeakLinkage() ||
+      def->hasLinkerPrivateWeakDefAutoLinkage()) {
     attr |= LTO_SYMBOL_DEFINITION_WEAK;
   }
   else if (def->hasCommonLinkage()) {