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
commit2c87dd9d7a7e7ea71ba8eb8f5c8917cafb9c3fd5 (patch)
treee44316327b904a7d01ea8c82115ebf25b1cb92e1
parent53c0c8b7030f5b50e8054e57658b2fbd3f254a6e (diff)
downloadllvm-2c87dd9d7a7e7ea71ba8eb8f5c8917cafb9c3fd5.tar.gz
Merge from mainline.
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
-rw-r--r--lib/Linker/LinkModules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index cee3b23e2a4e..b958e34fc78b 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/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");
}