[lld] r205579 - Update comment.
Rui Ueyama
ruiu at google.com
Thu Apr 3 15:58:41 PDT 2014
Author: ruiu
Date: Thu Apr 3 17:58:41 2014
New Revision: 205579
URL: http://llvm.org/viewvc/llvm-project?rev=205579&view=rev
Log:
Update comment.
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=205579&r1=205578&r2=205579&view=diff
==============================================================================
--- lld/trunk/lib/Core/SymbolTable.cpp (original)
+++ lld/trunk/lib/Core/SymbolTable.cpp Thu Apr 3 17:58:41 2014
@@ -378,11 +378,12 @@ void SymbolTable::addReplacement(const A
}
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;
}
}
More information about the llvm-commits
mailing list