summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-10-15 20:10:08 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-10-15 20:10:08 +0000
commit82dd61114df65bf945f0fcce7de19cf358620ee4 (patch)
treed96e5ff2879882250119195362bf9a17dcc4daf8 /llvm
parentdbc44de285846bddc3176778cafc94850bbb662e (diff)
downloadbcm5719-llvm-82dd61114df65bf945f0fcce7de19cf358620ee4.tar.gz
bcm5719-llvm-82dd61114df65bf945f0fcce7de19cf358620ee4.zip
Properly handle linking of strong alias with weak function, this fixes PR2883
llvm-svn: 57594
Diffstat (limited to 'llvm')
-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 cee3b23e2a4..b958e34fc78 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");
}
OpenPOWER on IntegriCloud