aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-12-27 23:21:57 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-12-27 23:21:57 +0000
commit650d5053bfb388bc81aecd202f16d2e128e1f23e (patch)
treee42a669b34052ff709ddc95a2d22b7a307fc0343
parenta353ffa7e556bfd2864474911174da691117f691 (diff)
downloadexternal_llvm-650d5053bfb388bc81aecd202f16d2e128e1f23e.zip
external_llvm-650d5053bfb388bc81aecd202f16d2e128e1f23e.tar.gz
external_llvm-650d5053bfb388bc81aecd202f16d2e128e1f23e.tar.bz2
Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45375 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Linker/LinkModules.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 3aea74e..3c8d377 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -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