mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
make lookup failures not fatal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109530 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
977fa34df8
commit
90f8795e1c
@ -139,7 +139,12 @@ public:
|
||||
}
|
||||
|
||||
V lookup(const K &Key) {
|
||||
return TopLevelMap[Key]->getValue();
|
||||
typename DenseMap<K, ScopedHashTableVal<K, V, KInfo>*, KInfo>::iterator
|
||||
I = TopLevelMap.find(Key);
|
||||
if (I != TopLevelMap.end())
|
||||
return I->second->getValue();
|
||||
|
||||
return V();
|
||||
}
|
||||
|
||||
void insert(const K &Key, const V &Val) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user