Update comment.

llvm-svn: 205579
This commit is contained in:
Rui Ueyama 2014-04-03 22:58:41 +00:00
parent 71c0202dd0
commit 1c3486a312
1 changed files with 2 additions and 1 deletions

View 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;
}
}