LLVM  6.0.0svn
Functions
StringMap.cpp File Reference
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
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...
 

Function Documentation

◆ getMinBucketToReserveForEntries()

static unsigned getMinBucketToReserveForEntries ( unsigned  NumEntries)
static

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

Definition at line 24 of file StringMap.cpp.

References llvm::NextPowerOf2().

Referenced by llvm::DenseMap< unsigned, unsigned >::init(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::reserve(), and llvm::StringMapImpl::StringMapImpl().