ScopedHashTable.h (208954) | ScopedHashTable.h (212904) |
---|---|
1//===- ScopedHashTable.h - A simple scoped hash table ---------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 125 unchanged lines hidden (view full) --- 134 assert(CurScope == 0 && TopLevelMap.empty() && "Scope imbalance!"); 135 } 136 137 bool count(const K &Key) const { 138 return TopLevelMap.count(Key); 139 } 140 141 V lookup(const K &Key) { | 1//===- ScopedHashTable.h - A simple scoped hash table ---------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 125 unchanged lines hidden (view full) --- 134 assert(CurScope == 0 && TopLevelMap.empty() && "Scope imbalance!"); 135 } 136 137 bool count(const K &Key) const { 138 return TopLevelMap.count(Key); 139 } 140 141 V lookup(const K &Key) { |
142 return TopLevelMap[Key]->getValue(); | 142 typename DenseMap<K, ScopedHashTableVal<K, V, KInfo>*, KInfo>::iterator 143 I = TopLevelMap.find(Key); 144 if (I != TopLevelMap.end()) 145 return I->second->getValue(); 146 147 return V(); |
143 } 144 145 void insert(const K &Key, const V &Val) { 146 assert(CurScope && "No scope active!"); 147 148 ScopedHashTableVal<K, V, KInfo> *&KeyEntry = TopLevelMap[Key]; 149 150 KeyEntry= new ScopedHashTableVal<K, V, KInfo>(CurScope->getLastValInScope(), --- 56 unchanged lines hidden --- | 148 } 149 150 void insert(const K &Key, const V &Val) { 151 assert(CurScope && "No scope active!"); 152 153 ScopedHashTableVal<K, V, KInfo> *&KeyEntry = TopLevelMap[Key]; 154 155 KeyEntry= new ScopedHashTableVal<K, V, KInfo>(CurScope->getLastValInScope(), --- 56 unchanged lines hidden --- |