LLVM 22.0.0git
StringMap.cpp File Reference

Go to the source code of this file.

Functions

static unsigned getMinBucketToReserveForEntries (unsigned NumEntries)
 Returns the number of buckets to allocate to ensure that the DenseMap can accommodate NumEntries without need to grow().
static StringMapEntryBase ** createTable (unsigned NewNumBuckets)
static unsignedgetHashTable (StringMapEntryBase **TheTable, unsigned NumBuckets)

Function Documentation

◆ createTable()

StringMapEntryBase ** createTable ( unsigned NewNumBuckets)
inlinestatic

Definition at line 31 of file StringMap.cpp.

References llvm::safe_calloc().

Referenced by llvm::StringMapImpl::init(), and llvm::StringMapImpl::RehashTable().

◆ getHashTable()

unsigned * getHashTable ( StringMapEntryBase ** TheTable,
unsigned NumBuckets )
inlinestatic

◆ getMinBucketToReserveForEntries()

unsigned getMinBucketToReserveForEntries ( unsigned NumEntries)
inlinestatic

Returns the number of buckets to allocate to ensure that the DenseMap can accommodate NumEntries without need to grow().

Definition at line 22 of file StringMap.cpp.

References llvm::NextPowerOf2().

Referenced by llvm::StringMapImpl::StringMapImpl().