StringMap ‐ This is an unconventional map that is specialized for handling keys that are "strings", which are basically ranges of bytes. This does some funky memory allocation and hashing things to make it extremely efficient, storing the string data after the value in the map.
Synopsis
Declared in <llvm/ADT/StringMap.h>
template<>
class StringMap<unsigned int>
: public StringMapImpl
Base Classes
Name |
Description |
StringMapImpl ‐ This is the base class of StringMap that is shared among all of its instantiations. |
Types
Name |
Description |
Empty stub of HandleBase used when ABI‐breaking checks are disabled. |
Type Aliases
Name |
Description |
Entry type storing a key and mapped value together. |
|
Const iterator over map entries. |
|
Mutable iterator over map entries. |
|
Key type exposed for STL compatibility (internally a C string pointer). |
|
Mapped value type. |
|
Unsigned type used for sizes. |
|
Entry type combining key and value. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy all entries and free the table. |
Copy‐assign by swapping with a copy of |
|
at ‐ Return the entry for the specified key, or abort if no such entry exists. |
|
|
|
Remove all entries from the map. |
|
contains ‐ Return true if the element is in the map, false otherwise. |
|
|
|
Return true if the map contains no entries. |
|
|
|
|
|
|
|
Return the number of allocated hash buckets. |
|
Return the number of live entries. |
|
No‐op when ABI‐breaking checks are disabled. |
|
|
|
Inserts an element or assigns to the current element if the key already exists. The return type is the same as try_emplace. |
|
Return a range that yields each key as a StringRef. |
|
lookup ‐ Return the entry for the specified key, or a default constructed value if no such entry exists. |
|
Lookup the ValueTy for the |
|
remove ‐ Remove the specified key/value pair from the map, but do not erase it. This aborts if the key is not in the map. |
|
Remove every entry for which |
|
Return the number of live entries. |
|
Exchange the contents of this map with |
|
Emplace a value for |
|
Emplace a value for |
|
equal ‐ check whether both of the containers are equal. |
|
Return true if the maps differ in keys or values. |
Static Member Functions
Name |
Description |
Return the hash value used for |
Using Declarations
Name |
Protected Member Functions
Name |
Description |
|
|
|
|
Grow and rehash the table; return the new bucket for |
|
|
|
Return a range over the raw bucket pointer array. |
|
Allocate the table with the specified number of buckets and otherwise setup the map as empty. |
|
Remove the entry pointer at the given (live) bucket without destroying the entry, and close the hole via Algorithm R backward shifting. |
Protected Data Members
Name |
Description |
Size in bytes of each StringMapEntry specialization. |
|
Number of hash buckets currently allocated. |
|
Number of live key/value entries in the map. |
|
Hash table of entry pointers; null slots are empty probe holes. |
Created with MrDocs