diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | d39c594d39df7f283c2fb8a704a3f31c501180d9 (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /include/llvm/ADT/ScopedHashTable.h | |
parent | 6144c1de6a7674dad94290650e4e14f24d42e421 (diff) |
Notes
Diffstat (limited to 'include/llvm/ADT/ScopedHashTable.h')
-rw-r--r-- | include/llvm/ADT/ScopedHashTable.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/ADT/ScopedHashTable.h b/include/llvm/ADT/ScopedHashTable.h index b5ca374a7ddd..c96ad19707f3 100644 --- a/include/llvm/ADT/ScopedHashTable.h +++ b/include/llvm/ADT/ScopedHashTable.h @@ -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) { |