1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Properly handle linking of strong alias with weak function, this fixes PR2883

llvm-svn: 57594
This commit is contained in:
Anton Korobeynikov 2008-10-15 20:10:08 +00:00
parent 8d26b9c07a
commit d514695f79

View File

@ -984,7 +984,7 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
// The only valid mappings are:
// - SF is external declaration, which is effectively a no-op.
// - SF is weak, when we just need to throw SF out.
if (!SF->isDeclaration())
if (!SF->isDeclaration() && !SF->mayBeOverridden())
return Error(Err, "Function-Alias Collision on '" + SF->getName() +
"': symbol multiple defined");
}