summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ADT/ScopedHashTable.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/ScopedHashTable.h b/llvm/include/llvm/ADT/ScopedHashTable.h
index d5382954c63..df766935db7 100644
--- a/llvm/include/llvm/ADT/ScopedHashTable.h
+++ b/llvm/include/llvm/ADT/ScopedHashTable.h
@@ -130,6 +130,14 @@ public:
assert(CurScope == 0 && TopLevelMap.empty() && "Scope imbalance!");
}
+ bool count(const K &Key) const {
+ return TopLevelMap.count(Key);
+ }
+
+ V lookup(const K &Key) {
+ return TopLevelMap[Key].getValue();
+ }
+
void insert(const K &Key, const V &Val) {
assert(CurScope && "No scope active!");
OpenPOWER on IntegriCloud