summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/SymbolTable.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-06-05 07:37:29 +0000
committerRui Ueyama <ruiu@google.com>2014-06-05 07:37:29 +0000
commit733b45f3b05a7e2971656dd0b90fe7ddcd45311f (patch)
tree1ed98f2f1f04abd20ddb3cb85b09a2d47aa70c3c /lld/lib/Core/SymbolTable.cpp
parent52edc4903136edda614e31bf08c5d5118ba071bf (diff)
downloadbcm5719-llvm-733b45f3b05a7e2971656dd0b90fe7ddcd45311f.tar.gz
bcm5719-llvm-733b45f3b05a7e2971656dd0b90fe7ddcd45311f.zip
Add SymbolTable::isCoalescedAway
isCoalescedAway(x) is faster than replacement(x) != x as the former does not follow the replacement atom chain. Also it's easier to use. llvm-svn: 210242
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r--lld/lib/Core/SymbolTable.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp
index ae33fe089c1..b1a1eadbc44 100644
--- a/lld/lib/Core/SymbolTable.cpp
+++ b/lld/lib/Core/SymbolTable.cpp
@@ -381,6 +381,10 @@ const Atom *SymbolTable::replacement(const Atom *atom) {
}
}
+bool SymbolTable::isCoalescedAway(const Atom *atom) {
+ return _replacedAtoms.count(atom) > 0;
+}
+
unsigned int SymbolTable::size() {
return _nameTable.size();
}
OpenPOWER on IntegriCloud