diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-10-17 18:05:18 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-10-17 18:05:18 +0000 |
commit | 83d2dae0bed219471adf68054e09fe17f7789015 (patch) | |
tree | 71cfdf604c747683b2f66f9f2ecc914dba15904b | |
parent | b3b4f8ec712aaae175dee77d2c1facc21aab9787 (diff) | |
download | llvm-83d2dae0bed219471adf68054e09fe17f7789015.tar.gz |
Merge from mainline.
Properly handle linking of strong alias with weak function, this fixes
PR2883
llvm-svn: 57707
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index cee3b23e2a4e..b958e34fc78b 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -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"); } |