summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-04-21 14:56:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-04-21 14:56:33 +0000
commit15ca14c0b9f750caca034de96f0e980b7fa8b5c9 (patch)
tree3a5ca1eba490d88c930977f432d14e6658b66da9 /llvm/lib/Linker/LinkModules.cpp
parentbf8b5f8dd2331870ee4ca0a3e242b98903293631 (diff)
downloadbcm5719-llvm-15ca14c0b9f750caca034de96f0e980b7fa8b5c9.tar.gz
bcm5719-llvm-15ca14c0b9f750caca034de96f0e980b7fa8b5c9.zip
Fix recursive -only-needed.
We were assuming that only linkonce_odr GVs were lazy linked. llvm-svn: 266995
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-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 8ed885649ca..5b713fe29fb 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -423,7 +423,7 @@ void ModuleLinker::addLazyFor(GlobalValue &GV, IRMover::ValueAdder Add) {
return;
// Add these to the internalize list
- if (!GV.hasLinkOnceLinkage())
+ if (!GV.hasLinkOnceLinkage() && !shouldLinkOnlyNeeded())
return;
if (shouldInternalizeLinkedSymbols())
OpenPOWER on IntegriCloud