mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add a comment explaining how DenseMap::insert works, because it is not
intuitive. It does NOT update the value if the key is already in the map, it also returns false if the key is already in the map, regardless if the value matched. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4de86fe0d7
commit
127445818e
@ -145,6 +145,9 @@ public:
|
||||
return ValueT();
|
||||
}
|
||||
|
||||
// Inserts key,value pair into the map if the key isn't already in the map.
|
||||
// If the key is already in the map, it returns false and doesn't update the
|
||||
// value.
|
||||
std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) {
|
||||
BucketT *TheBucket;
|
||||
if (LookupBucketFor(KV.first, TheBucket))
|
||||
|
Loading…
Reference in New Issue
Block a user