LLVM  15.0.0git
Functions
StringMap.cpp File Reference
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/DJB.h"
#include "llvm/Support/MathExtras.h"
Include dependency graph for StringMap.cpp:

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(). More...
 
static StringMapEntryBase ** createTable (unsigned NewNumBuckets)
 
static unsigned * getHashTable (StringMapEntryBase **TheTable, unsigned NumBuckets)
 

Function Documentation

◆ createTable()

static StringMapEntryBase** createTable ( unsigned  NewNumBuckets)
inlinestatic

Definition at line 30 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 21 of file StringMap.cpp.

References llvm::NextPowerOf2().

Referenced by llvm::DenseMap< unsigned, unsigned >::init(), and llvm::StringMapImpl::StringMapImpl().