mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-08 08:54:58 +00:00
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
This commit is contained in:
parent
4d46d0af58
commit
7b75fbf224
@ -189,6 +189,15 @@ public:
|
|||||||
return end();
|
return end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// lookup - Return the entry for the specified key, or a default
|
||||||
|
/// constructed value if no such entry exists.
|
||||||
|
ValueT lookup(const KeyT &Val) const {
|
||||||
|
BucketT *TheBucket;
|
||||||
|
if (LookupBucketFor(Val, TheBucket))
|
||||||
|
return TheBucket->second;
|
||||||
|
return ValueT();
|
||||||
|
}
|
||||||
|
|
||||||
std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) {
|
std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) {
|
||||||
BucketT *TheBucket;
|
BucketT *TheBucket;
|
||||||
if (LookupBucketFor(KV.first, TheBucket))
|
if (LookupBucketFor(KV.first, TheBucket))
|
||||||
|
Loading…
Reference in New Issue
Block a user