llvm.org GIT mirror llvm / 7b75fbf
Add DenseMap::lookup: /// lookup - Return the entry for the specified key, or a default /// constructed value if no such entry exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55523 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 11 years ago
1 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
188188 return end();
189189 }
190190
191 /// lookup - Return the entry for the specified key, or a default
192 /// constructed value if no such entry exists.
193 ValueT lookup(const KeyT &Val) const {
194 BucketT *TheBucket;
195 if (LookupBucketFor(Val, TheBucket))
196 return TheBucket->second;
197 return ValueT();
198 }
199
191200 std::pair insert(const std::pair &KV) {
192201 BucketT *TheBucket;
193202 if (LookupBucketFor(KV.first, TheBucket))