summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-04 08:30:43 +0000
committerChris Lattner <sabre@nondot.org>2004-08-04 08:30:43 +0000
commita6241aed38eaf4805653a3cc5c89c1a13bd0339d (patch)
tree9230c60f2fbdc850cef1be64e13b9a5ce143e516
parent43252afdde6257282599e37002a8f00c4f2ededf (diff)
downloadbcm5719-llvm-a6241aed38eaf4805653a3cc5c89c1a13bd0339d.tar.gz
bcm5719-llvm-a6241aed38eaf4805653a3cc5c89c1a13bd0339d.zip
Fix a major regression in my previous checkin
llvm-svn: 15486
-rw-r--r--llvm/lib/VMCore/Linker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Linker.cpp b/llvm/lib/VMCore/Linker.cpp
index 5eadc388b6d..d10b2ccd9b3 100644
--- a/llvm/lib/VMCore/Linker.cpp
+++ b/llvm/lib/VMCore/Linker.cpp
@@ -411,6 +411,8 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
GlobalsByName.find(SGV->getName());
if (EGV != GlobalsByName.end())
DGV = dyn_cast<GlobalVariable>(EGV->second);
+ if (DGV && RecursiveResolveTypes(SGV->getType(), DGV->getType(), ST, ""))
+ DGV = 0; // FIXME: gross.
}
assert(SGV->hasInitializer() || SGV->hasExternalLinkage() &&
@@ -589,6 +591,8 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
GlobalsByName.find(SF->getName());
if (EF != GlobalsByName.end())
DF = dyn_cast<Function>(EF->second);
+ if (DF && RecursiveResolveTypes(SF->getType(), DF->getType(), ST, ""))
+ DF = 0; // FIXME: gross.
}
if (!DF || SF->hasInternalLinkage() || DF->hasInternalLinkage()) {
OpenPOWER on IntegriCloud