summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-10-17 18:05:18 +0000
committerTanya Lattner <tonic@nondot.org>2008-10-17 18:05:18 +0000
commit83d2dae0bed219471adf68054e09fe17f7789015 (patch)
tree71cfdf604c747683b2f66f9f2ecc914dba15904b
parentb3b4f8ec712aaae175dee77d2c1facc21aab9787 (diff)
downloadllvm-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.cpp2
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");
}