aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/ScopedHashTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/ScopedHashTable.h')
-rw-r--r--include/llvm/ADT/ScopedHashTable.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/ADT/ScopedHashTable.h b/include/llvm/ADT/ScopedHashTable.h
index d538295..df76693 100644
--- a/include/llvm/ADT/ScopedHashTable.h
+++ b/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!");