Make safer variant of alias resolution routine to be default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56005 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2008-09-09 20:05:04 +00:00
parent 7ca9d81bce
commit 19e861a4ff
8 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -1169,7 +1169,7 @@ static bool LinkAppendingVars(Module *M,
static bool ResolveAliases(Module *Dest) {
for (Module::alias_iterator I = Dest->alias_begin(), E = Dest->alias_end();
I != E; ++I)
if (const GlobalValue *GV = I->resolveAliasedGlobal(/*traverseWeak*/ false))
if (const GlobalValue *GV = I->resolveAliasedGlobal())
if (GV != I && !GV->isDeclaration())
I->replaceAllUsesWith(const_cast<GlobalValue*>(GV));