Fix a major regression in my previous checkin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-08-04 08:30:43 +00:00
parent cc7ba49d85
commit 868bbf35b0
2 changed files with 8 additions and 0 deletions

View File

@ -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()) {

View File

@ -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()) {