Update comment.
authorRui Ueyama <ruiu@google.com>
Thu, 3 Apr 2014 22:58:41 +0000 (22:58 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 3 Apr 2014 22:58:41 +0000 (22:58 +0000)
llvm-svn: 205579

lld/lib/Core/SymbolTable.cpp

index 067a799eb1bd636c88a812f44cd602681996f597..2ad1d80927a2f2f78e7b550a890e4eaad9a502b6 100644 (file)
@@ -378,11 +378,12 @@ void SymbolTable::addReplacement(const Atom *replaced,
 }
 
 const Atom *SymbolTable::replacement(const Atom *atom) {
+  // Find the replacement for a given atom. Atoms in _replacedAtoms
+  // may be chained, so find the last one.
   for (;;) {
     AtomToAtom::iterator pos = _replacedAtoms.find(atom);
     if (pos == _replacedAtoms.end())
       return atom;
-    // might be chain, recurse to end
     atom = pos->second;
   }
 }