mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 00:33:09 +00:00
Add count() and lookup() to ScopedHashTable. It might be useful to get information out of the hash table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6183fbd726
commit
7f05aa72f9
@ -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!");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user