summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/include/lld/Core/Resolver.h5
-rw-r--r--lld/lib/Core/Resolver.cpp8
2 files changed, 4 insertions, 9 deletions
diff --git a/lld/include/lld/Core/Resolver.h b/lld/include/lld/Core/Resolver.h
index 1a982b72a8c..c0713011f4e 100644
--- a/lld/include/lld/Core/Resolver.h
+++ b/lld/include/lld/Core/Resolver.h
@@ -38,7 +38,7 @@ public:
Resolver(LinkingContext &context)
: _context(context), _symbolTable(context), _result(new MergedFile()),
- _haveLLVMObjs(false), _addToFinalSection(false) {}
+ _addToFinalSection(false) {}
// InputFiles::Handler methods
void doDefinedAtom(const DefinedAtom&);
@@ -71,7 +71,7 @@ private:
bool resolveUndefines();
void updateReferences();
void deadStripOptimize();
- bool checkUndefines(bool isFinal);
+ bool checkUndefines();
void removeCoalescedAwayAtoms();
void checkDylibSymbolCollisions();
void linkTimeOptimize();
@@ -117,7 +117,6 @@ private:
std::vector<const Atom *> _atomsWithUnresolvedReferences;
llvm::DenseSet<const Atom *> _liveAtoms;
std::unique_ptr<MergedFile> _result;
- bool _haveLLVMObjs;
bool _addToFinalSection;
};
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index f42c47edaba..f7330f651d0 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -397,11 +397,7 @@ void Resolver::deadStripOptimize() {
}
// error out if some undefines remain
-bool Resolver::checkUndefines(bool isFinal) {
- // when using LTO, undefines are checked after bitcode is optimized
- if (_haveLLVMObjs && !isFinal)
- return false;
-
+bool Resolver::checkUndefines() {
// build vector of remaining undefined symbols
std::vector<const UndefinedAtom *> undefinedAtoms;
_symbolTable.undefines(undefinedAtoms);
@@ -466,7 +462,7 @@ bool Resolver::resolve() {
return false;
this->updateReferences();
this->deadStripOptimize();
- if (this->checkUndefines(false))
+ if (this->checkUndefines())
if (!_context.allowRemainingUndefines())
return false;
this->removeCoalescedAwayAtoms();
OpenPOWER on IntegriCloud