LLVM 20.0.0git
Functions
StringMap.cpp File Reference
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ReverseIteration.h"
#include "llvm/Support/xxhash.h"

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()

static 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()

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

◆ getMinBucketToReserveForEntries()

static 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().