Map specialized for string keys with efficient allocation and hashing.
Synopsis
Declared in <llvm/ADT/StringMap.h>
template<
typename ValueTy,
typename AllocatorTy = MallocAllocator>
class StringMap
: public StringMapImpl
Description
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.
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 |
|
Return a const reference to the value for |
|
|
|
Remove all entries from the map. |
|
Return true if |
|
|
|
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. |
|
|
|
Insert or assign a mapped value for |
|
Return a range that yields each key as a StringRef. |
|
Return the value for |
|
Return a reference to the value for |
|
Remove |
|
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 |
|
Return true if this map and |
|
Return true if the maps differ in keys or values. |
Static Member Functions
Name |
Description |
Return the hash value used for |
Using Declarations
Name |
Description |
Return the allocator used by this map. |
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. |
Non-Member Functions
Name |
Description |
Returns the default enabled features for |
|
Print a table of ‐march extensions that have a non‐empty feature string. |
|
Parse |
|
Return the default target features for PowerPC CPU |
|
Add default bootstrap values for JIT execution in the host process. |
|
getHostCPUFeatures ‐ Get the LLVM names for the host CPU features. |