[lld] r205401 - Remove dead code.
Rui Ueyama
ruiu at google.com
Tue Apr 1 23:38:46 PDT 2014
Author: ruiu
Date: Wed Apr 2 01:38:46 2014
New Revision: 205401
URL: http://llvm.org/viewvc/llvm-project?rev=205401&view=rev
Log:
Remove dead code.
Modified:
lld/trunk/include/lld/Core/Resolver.h
lld/trunk/lib/Core/Resolver.cpp
Modified: lld/trunk/include/lld/Core/Resolver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Resolver.h?rev=205401&r1=205400&r2=205401&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Resolver.h (original)
+++ lld/trunk/include/lld/Core/Resolver.h Wed Apr 2 01:38:46 2014
@@ -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;
};
Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=205401&r1=205400&r2=205401&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Wed Apr 2 01:38:46 2014
@@ -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();
More information about the llvm-commits
mailing list