summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit4f00f531ad028e80d2d68583bda724f8ffc200f4 (patch)
treec90a8094832c565ff5f73613c0da21d56b27184e /llvm/lib
parent20bc6e06cd30897a9853554c25ba1d2b2204733e (diff)
downloadbcm5719-llvm-4f00f531ad028e80d2d68583bda724f8ffc200f4.tar.gz
bcm5719-llvm-4f00f531ad028e80d2d68583bda724f8ffc200f4.zip
Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function. llvm-svn: 45375
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 3aea74e79d2..3c8d377a4c6 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud