class StringMapImpl
Declaration
class StringMapImpl { /* full declaration omitted */ };
Description
StringMapImpl - This is the base class of StringMap that is shared among all of its instantiations.
Declared at: llvm/include/llvm/ADT/StringMap.h:32
Member Variables
- protected llvm::StringMapEntryBase** TheTable = nullptr
- protected unsigned int NumBuckets = 0
- protected unsigned int NumItems = 0
- protected unsigned int NumTombstones = 0
- protected unsigned int ItemSize
- public static const uintptr_t TombstoneIntVal = static_cast<unsigned long>(-1) << PointerLikeTypeTraits<StringMapEntryBase *>::NumLowBitsAvailable
Method Overview
- protected int FindKey(llvm::StringRef Key) const
- protected unsigned int LookupBucketFor(llvm::StringRef Key)
- protected unsigned int RehashTable(unsigned int BucketNo = 0)
- protected void RemoveKey(llvm::StringMapEntryBase * V)
- protected llvm::StringMapEntryBase * RemoveKey(llvm::StringRef Key)
- protected StringMapImpl(unsigned int itemSize)
- protected StringMapImpl(llvm::StringMapImpl && RHS)
- protected StringMapImpl(unsigned int InitSize, unsigned int ItemSize)
- public bool empty() const
- public unsigned int getNumBuckets() const
- public unsigned int getNumItems() const
- public static llvm::StringMapEntryBase * getTombstoneVal()
- protected void init(unsigned int Size)
- public unsigned int size() const
- public void swap(llvm::StringMapImpl & Other)
Methods
¶int FindKey(llvm::StringRef Key) const
int FindKey(llvm::StringRef Key) const
Description
FindKey - Look up the bucket that contains the specified key. If it exists in the map, return the bucket number of the key. Otherwise return -1. This does not modify the map.
Declared at: llvm/include/llvm/ADT/StringMap.h:68
Parameters
- llvm::StringRef Key
¶unsigned int LookupBucketFor(llvm::StringRef Key)
unsigned int LookupBucketFor(llvm::StringRef Key)
Description
LookupBucketFor - Look up the bucket that the specified string should end up in. If it already exists as a key in the map, the Item pointer for the specified bucket will be non-null. Otherwise, it will be null. In either case, the FullHashValue field of the bucket will be set to the hash value of the string.
Declared at: llvm/include/llvm/ADT/StringMap.h:63
Parameters
- llvm::StringRef Key
¶unsigned int RehashTable(
unsigned int BucketNo = 0)
unsigned int RehashTable(
unsigned int BucketNo = 0)
Declared at: llvm/include/llvm/ADT/StringMap.h:56
Parameters
- unsigned int BucketNo = 0
¶void RemoveKey(llvm::StringMapEntryBase* V)
void RemoveKey(llvm::StringMapEntryBase* V)
Description
RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. This aborts if the value isn't in the table.
Declared at: llvm/include/llvm/ADT/StringMap.h:72
Parameters
¶llvm::StringMapEntryBase* RemoveKey(
llvm::StringRef Key)
llvm::StringMapEntryBase* RemoveKey(
llvm::StringRef Key)
Description
RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. If the key is not in the table, this returns null.
Declared at: llvm/include/llvm/ADT/StringMap.h:76
Parameters
- llvm::StringRef Key
¶StringMapImpl(unsigned int itemSize)
StringMapImpl(unsigned int itemSize)
Declared at: llvm/include/llvm/ADT/StringMap.h:44
Parameters
- unsigned int itemSize
¶StringMapImpl(llvm::StringMapImpl&& RHS)
StringMapImpl(llvm::StringMapImpl&& RHS)
Declared at: llvm/include/llvm/ADT/StringMap.h:45
Parameters
- llvm::StringMapImpl&& RHS
¶StringMapImpl(unsigned int InitSize,
unsigned int ItemSize)
StringMapImpl(unsigned int InitSize,
unsigned int ItemSize)
Declared at: llvm/include/llvm/ADT/StringMap.h:55
Parameters
- unsigned int InitSize
- unsigned int ItemSize
¶bool empty() const
bool empty() const
Declared at: llvm/include/llvm/ADT/StringMap.h:94
¶unsigned int getNumBuckets() const
unsigned int getNumBuckets() const
Declared at: llvm/include/llvm/ADT/StringMap.h:91
¶unsigned int getNumItems() const
unsigned int getNumItems() const
Declared at: llvm/include/llvm/ADT/StringMap.h:92
¶static llvm::StringMapEntryBase* getTombstoneVal()
static llvm::StringMapEntryBase* getTombstoneVal()
Declared at: llvm/include/llvm/ADT/StringMap.h:87
¶void init(unsigned int Size)
void init(unsigned int Size)
Description
Allocate the table with the specified number of buckets and otherwise setup the map as empty.
Declared at: llvm/include/llvm/ADT/StringMap.h:80
Parameters
- unsigned int Size
¶unsigned int size() const
unsigned int size() const
Declared at: llvm/include/llvm/ADT/StringMap.h:95
¶void swap(llvm::StringMapImpl& Other)
void swap(llvm::StringMapImpl& Other)
Declared at: llvm/include/llvm/ADT/StringMap.h:97
Parameters
- llvm::StringMapImpl& Other