summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/SymbolTable.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-04-03 22:58:41 +0000
committerRui Ueyama <ruiu@google.com>2014-04-03 22:58:41 +0000
commit1c3486a31228c83d337a06a1b4222f015283ff4f (patch)
tree64715915422efbab9c56f6dc15d17ebeca769600 /lld/lib/Core/SymbolTable.cpp
parent71c0202dd0e3d3e77dcfd0c78a5540e9e8e931f3 (diff)
downloadbcm5719-llvm-1c3486a31228c83d337a06a1b4222f015283ff4f.tar.gz
bcm5719-llvm-1c3486a31228c83d337a06a1b4222f015283ff4f.zip
Update comment.
llvm-svn: 205579
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r--lld/lib/Core/SymbolTable.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp
index 067a799eb1b..2ad1d80927a 100644
--- a/lld/lib/Core/SymbolTable.cpp
+++ b/lld/lib/Core/SymbolTable.cpp
@@ -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;
}
}
OpenPOWER on IntegriCloud