Ignore functions with internal linkages during linking. This snipped mimics the
[oota-llvm.git] / lib / Linker / LinkModules.cpp
index 3aea74e79d28a0924336d968a27b55a5cb10a682..3c8d377a4c6ec288d597564f8f9c3eabdfe86539 100644 (file)
@@ -663,6 +663,9 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
                      "': 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