From: Anton Korobeynikov Date: Mon, 10 Mar 2008 22:35:31 +0000 (+0000) Subject: Always run 'make check' :) Fix fallout from prev. commit: query for possible X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=aeb09967fdb2ff074c91ce8039ebd1917a2f6060;p=oota-llvm.git Always run 'make check' :) Fix fallout from prev. commit: query for possible alias destination only if we don't have anything to link to git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48181 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index e07629f51be..6f26e95892a 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -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.