diff options
author | Rui Ueyama <ruiu@google.com> | 2014-08-22 02:00:58 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-08-22 02:00:58 +0000 |
commit | 839fb2f10c651d60f5dda2613a662fd61504e38f (patch) | |
tree | 60b541762c9a9a8d57ef690dc57221bc43cf7f2e /lld/lib/Core/SymbolTable.cpp | |
parent | b49d7abb7b289b73af0485c50c642216a5509eaa (diff) | |
download | bcm5719-llvm-839fb2f10c651d60f5dda2613a662fd61504e38f.tar.gz bcm5719-llvm-839fb2f10c651d60f5dda2613a662fd61504e38f.zip |
Simplify. No functionality changes.
llvm-svn: 216257
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r-- | lld/lib/Core/SymbolTable.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp index cc2146bffd2..772c4d022ab 100644 --- a/lld/lib/Core/SymbolTable.cpp +++ b/lld/lib/Core/SymbolTable.cpp @@ -398,12 +398,9 @@ std::vector<const UndefinedAtom *> SymbolTable::undefines() { for (auto it : _nameTable) { const Atom *atom = it.second; assert(atom != nullptr); - if (const auto undef = dyn_cast<const UndefinedAtom>(atom)) { - AtomToAtom::iterator pos = _replacedAtoms.find(undef); - if (pos != _replacedAtoms.end()) - continue; - ret.push_back(undef); - } + if (const auto *undef = dyn_cast<const UndefinedAtom>(atom)) + if (_replacedAtoms.count(undef) == 0) + ret.push_back(undef); } return ret; } |