Always run 'make check' :) Fix fallout from prev. commit: query for possible

alias destination only if we don't have anything to link to

llvm-svn: 48181
This commit is contained in:
Anton Korobeynikov 2008-03-10 22:35:31 +00:00
parent eeb5ca6f5f
commit 715ef43c2e
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
}
// Check to see if may have to link the global with the alias
if (SGV->hasName() && !SGV->hasInternalLinkage()) {
if (!DGV && SGV->hasName() && !SGV->hasInternalLinkage()) {
DGV = Dest->getNamedAlias(SGV->getName());
if (DGV && DGV->getType() != SGV->getType())
// If types don't agree due to opaque types, try to resolve them.