mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Ultimately resolve aliases during linking, if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f1765e8298
commit
5241957b1f
@ -1087,11 +1087,10 @@ 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) {
|
||||
GlobalValue* GV = const_cast<GlobalValue*>(I->getAliasedGlobal());
|
||||
if (!GV->isDeclaration())
|
||||
I->replaceAllUsesWith(GV);
|
||||
}
|
||||
I != E; ++I)
|
||||
if (const GlobalValue *GV = I->resolveAliasedGlobal())
|
||||
if (!GV->isDeclaration())
|
||||
I->replaceAllUsesWith(const_cast<GlobalValue*>(GV));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user