mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Fix incorrect linker behaviour: we shouldn't resolve weak aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1169,8 +1169,8 @@ 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())
|
||||
if (!GV->isDeclaration())
|
||||
if (const GlobalValue *GV = I->resolveAliasedGlobal(/*traverseWeak*/ false))
|
||||
if (GV != I && !GV->isDeclaration())
|
||||
I->replaceAllUsesWith(const_cast<GlobalValue*>(GV));
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user