diff options
| author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-10-15 20:10:08 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-10-15 20:10:08 +0000 |
| commit | 29004182ec7144448dcabc3f168ad10eb4fb8040 (patch) | |
| tree | b59802fde2c2366d18caf483bbf9035d19dd5b1f /lib/Linker | |
| parent | e7c6bc2ed78c70799ad46352c7e993a5f85ef23b (diff) | |
| download | external_llvm-29004182ec7144448dcabc3f168ad10eb4fb8040.zip external_llvm-29004182ec7144448dcabc3f168ad10eb4fb8040.tar.gz external_llvm-29004182ec7144448dcabc3f168ad10eb4fb8040.tar.bz2 | |
Properly handle linking of strong alias with weak function, this fixes PR2883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
| -rw-r--r-- | lib/Linker/LinkModules.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index cee3b23..b958e34 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"); } |
