diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-07-07 01:51:11 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-07-07 01:51:11 +0000 |
commit | 730c82e6b87e9a58feddf9d837cb915c9e88e9fe (patch) | |
tree | 517d2e10ccc2f492c390147ddd976814a93ac706 /llvm/lib/LTO/LTO.cpp | |
parent | cd7194629bc36e867922c0eb804a4e3e6d2fcd6e (diff) | |
download | llvm-730c82e6b87e9a58feddf9d837cb915c9e88e9fe.zip llvm-730c82e6b87e9a58feddf9d837cb915c9e88e9fe.tar.gz llvm-730c82e6b87e9a58feddf9d837cb915c9e88e9fe.tar.bz2 |
ThinLTO: Remove check for multiple modules before applying weak resolutions.
This check is not only unnecessary, it can produce the wrong result. If we
are linking a single module and it has an exported linkonce symbol, we need
to promote to weak in order to avoid PR19901-style problems.
Differential Revision: http://reviews.llvm.org/D21917
llvm-svn: 274722
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 094b0c6..11bfc94 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -92,10 +92,6 @@ void thinLTOResolveWeakForLinkerInIndex( function_ref<bool(StringRef, GlobalValue::GUID)> isExported, function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)> recordNewLinkage) { - if (Index.modulePaths().size() == 1) - // Nothing to do if we don't have multiple modules - return; - // We won't optimize the globals that are referenced by an alias for now // Ideally we should turn the alias into a global and duplicate the definition // when needed. |