Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Merge from mainline.
Browse files Browse the repository at this point in the history
Properly handle linking of strong alias with weak function, this fixes
      PR2883


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_24@57707 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tlattner committed Oct 17, 2008
1 parent 53c0c8b commit 2c87dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Linker/LinkModules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 2c87dd9

Please sign in to comment.