[lld] r216257 - Simplify. No functionality changes.

Rui Ueyama ruiu at google.com
Thu Aug 21 19:00:58 PDT 2014


Author: ruiu
Date: Thu Aug 21 21:00:58 2014
New Revision: 216257

URL: http://llvm.org/viewvc/llvm-project?rev=216257&view=rev
Log:
Simplify. No functionality changes.

Modified:
    lld/trunk/lib/Core/SymbolTable.cpp

Modified: lld/trunk/lib/Core/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/SymbolTable.cpp?rev=216257&r1=216256&r2=216257&view=diff
==============================================================================
--- lld/trunk/lib/Core/SymbolTable.cpp (original)
+++ lld/trunk/lib/Core/SymbolTable.cpp Thu Aug 21 21:00:58 2014
@@ -398,12 +398,9 @@ std::vector<const UndefinedAtom *> Symbo
   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;
 }





More information about the llvm-commits mailing list