summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2017-01-20 21:54:58 +0000
committerTeresa Johnson <tejohnson@google.com>2017-01-20 21:54:58 +0000
commit4566c6db8772e1c8a3c8eaa091e61b34b063c773 (patch)
treea4925eced0fe044381018d85b54b2b133935efee /llvm/lib/LTO/LTO.cpp
parent5eb113d2af3cbe8430bee0a868e66ea5009754f0 (diff)
downloadbcm5719-llvm-4566c6db8772e1c8a3c8eaa091e61b34b063c773.tar.gz
bcm5719-llvm-4566c6db8772e1c8a3c8eaa091e61b34b063c773.zip
[ThinLTO] Drop non-prevailing non-ODR weak to declarations
Summary: Allow non-ODR weak/linkonce non-prevailing copies to be marked as available_externally in the index. Add support for dropping these to declarations in the backend. Reviewers: mehdi_amini, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28806 llvm-svn: 292656
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 0f22207c3fa..e11ad68bfa7 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -164,9 +164,7 @@ static void thinLTOResolveWeakForLinkerGUID(
}
// Alias and aliasee can't be turned into available_externally.
else if (!isa<AliasSummary>(S.get()) &&
- !GlobalInvolvedWithAlias.count(S.get()) &&
- (GlobalValue::isLinkOnceODRLinkage(OriginalLinkage) ||
- GlobalValue::isWeakODRLinkage(OriginalLinkage)))
+ !GlobalInvolvedWithAlias.count(S.get()))
S->setLinkage(GlobalValue::AvailableExternallyLinkage);
if (S->linkage() != OriginalLinkage)
recordNewLinkage(S->modulePath(), GUID, S->linkage());
OpenPOWER on IntegriCloud