Skip to content
Snippets Groups Projects
Commit 425592a9 authored by Chris Lattner's avatar Chris Lattner
Browse files

make lookup failures not fatal.

llvm-svn: 109530
parent 83b598c1
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment