Lines Matching refs:Key
72 /// up in. If it already exists as a key in the map, the Item pointer for the
76 unsigned LookupBucketFor(StringRef Key);
78 /// FindKey - Look up the bucket that contains the specified key. If it exists
79 /// in the map, return the bucket number of the key. Otherwise return -1.
81 int FindKey(StringRef Key) const;
87 /// RemoveKey - Remove the StringMapEntry for the specified key from the
88 /// table, returning it. If the key is not in the table, this returns null.
89 StringMapEntryBase *RemoveKey(StringRef Key);
114 /// a StringMap. It contains the Value itself and the key: the string length
138 /// getKeyData - Return the start of the string data that is the key for this
145 /// Create - Create a StringMapEntry for the specified key and default
148 static StringMapEntry *Create(StringRef Key, AllocatorTy &Allocator,
150 unsigned KeyLength = Key.size();
167 memcpy(StrBuffer, Key.data(), KeyLength);
173 static StringMapEntry *Create(StringRef Key, AllocatorTy &Allocator) {
174 return Create(Key, Allocator, ValueTy());
179 static StringMapEntry *Create(StringRef Key, InitType &&InitVal) {
181 return Create(Key, A, std::forward<InitType>(InitVal));
184 static StringMapEntry *Create(StringRef Key) {
185 return Create(Key, ValueTy());
188 /// GetStringMapEntryFromKeyData - Given key data that is known to be embedded
277 iterator find(StringRef Key) {
278 int Bucket = FindKey(Key);
283 const_iterator find(StringRef Key) const {
284 int Bucket = FindKey(Key);
289 /// lookup - Return the entry for the specified key, or a default
291 ValueTy lookup(StringRef Key) const {
292 const_iterator it = find(Key);
298 ValueTy &operator[](StringRef Key) {
299 return insert(std::make_pair(Key, ValueTy())).first->second;
303 size_type count(StringRef Key) const {
304 return find(Key) == end() ? 0 : 1;
307 /// insert - Insert the specified key/value pair into the map. If the key
326 /// insert - Inserts the specified key/value pair into the map if the key
329 /// the pair points to the element with key equivalent to the key of the pair.
366 /// remove - Remove the specified key/value pair from the map, but do not
367 /// erase it. This aborts if the key is not in the map.
378 bool erase(StringRef Key) {
379 iterator I = find(Key);