[llvm-commits] [llvm] r45375 - /llvm/trunk/lib/Linker/LinkModules.cpp

Anton Korobeynikov asl at math.spbu.ru
Thu Dec 27 15:21:57 PST 2007


Author: asl
Date: Thu Dec 27 17:21:57 2007
New Revision: 45375

URL: http://llvm.org/viewvc/llvm-project?rev=45375&view=rev
Log:
Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function.

Modified:
    llvm/trunk/lib/Linker/LinkModules.cpp

Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=45375&r1=45374&r2=45375&view=diff

==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Thu Dec 27 17:21:57 2007
@@ -663,6 +663,9 @@
                      "': symbols have different visibilities!");
     }
     
+    if (DF && DF->hasInternalLinkage())
+      DF = NULL;
+
     if (DF && DF->getType() != SF->getType()) {
       if (DF->isDeclaration() && !SF->isDeclaration()) {
         // We have a definition of the same name but different type in the





More information about the llvm-commits mailing list