summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-02-02 05:12:15 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-02-02 05:12:15 +0000
commitc387e70c699330dbfb6599a005a281960ca6da70 (patch)
treee2aec70573611a8e47d21e6217b285e62a686324 /llvm/lib/Linker/LinkModules.cpp
parent1116d6915cefd57fb6f20540f10a7859a214cae8 (diff)
downloadbcm5719-llvm-c387e70c699330dbfb6599a005a281960ca6da70.tar.gz
bcm5719-llvm-c387e70c699330dbfb6599a005a281960ca6da70.zip
Linker: Move special casing for available_externally in IRMover to clients. NFCI.
The goal is to simplify the semantic model for clients of IRMover. Differential Revision: https://reviews.llvm.org/D29435 llvm-svn: 293864
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index cf2c4ccf523..7ff84db0702 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -425,7 +425,8 @@ void ModuleLinker::addLazyFor(GlobalValue &GV, const IRMover::ValueAdder &Add) {
return;
// Add these to the internalize list
- if (!GV.hasLinkOnceLinkage() && !shouldLinkOnlyNeeded())
+ if (!GV.hasLinkOnceLinkage() && !GV.hasAvailableExternallyLinkage() &&
+ !shouldLinkOnlyNeeded())
return;
if (shouldInternalizeLinkedSymbols())
OpenPOWER on IntegriCloud