[llvm-commits] [llvm] r124634 - /llvm/trunk/tools/lto/LTOModule.cpp

Rafael Espindola rafael.espindola at gmail.com
Mon Jan 31 16:41:51 PST 2011


Author: rafael
Date: Mon Jan 31 18:41:51 2011
New Revision: 124634

URL: http://llvm.org/viewvc/llvm-project?rev=124634&view=rev
Log:
Don't tell the linker about available_externally definitions. If we do, it will
complain about duplicated definitions.

Modified:
    llvm/trunk/tools/lto/LTOModule.cpp

Modified: llvm/trunk/tools/lto/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=124634&r1=124633&r2=124634&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto/LTOModule.cpp Mon Jan 31 18:41:51 2011
@@ -304,6 +304,10 @@
   if (def->getName().startswith("llvm."))
     return;
 
+  // ignore available_externally
+  if (def->hasAvailableExternallyLinkage())
+    return;
+
   // string is owned by _defines
   const char *symbolName = ::strdup(mangler.getNameWithPrefix(def).c_str());
 





More information about the llvm-commits mailing list