LLVM  4.0.0
Public Member Functions | Friends | List of all members
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT > Class Template Reference

#include <DenseMap.h>

Inherits llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >.

Collaboration diagram for llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >:
[legend]

Public Member Functions

 DenseMap (unsigned InitialReserve=0)
 Create a DenseMap wth an optional InitialReserve that guarantee that this number of elements can be inserted in the map without grow() More...
 
 DenseMap (const DenseMap &other)
 
 DenseMap (DenseMap &&other)
 
template<typename InputIt >
 DenseMap (const InputIt &I, const InputIt &E)
 
 ~DenseMap ()
 
void swap (DenseMap &RHS)
 
DenseMapoperator= (const DenseMap &other)
 
DenseMapoperator= (DenseMap &&other)
 
void copyFrom (const DenseMap &other)
 
void init (unsigned InitNumEntries)
 
void grow (unsigned AtLeast)
 
void shrink_and_clear ()
 
- Public Member Functions inherited from llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
LLVM_NODISCARD bool empty () const
 
unsigned size () const
 
void reserve (size_type NumEntries)
 Grow the densemap so that it can contain at least NumEntries items before resizing again. More...
 
void clear ()
 
size_type count (const KeyT &Val) const
 Return 1 if the specified key is in the map, 0 otherwise. More...
 
iterator find (const KeyT &Val)
 
const_iterator find (const KeyT &Val) const
 
iterator find_as (const LookupKeyT &Val)
 Alternate version of find() which allows a different, and possibly less expensive, key type. More...
 
const_iterator find_as (const LookupKeyT &Val) const
 
ValueT lookup (const KeyT &Val) const
 lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. More...
 
std::pair< iterator, boolinsert (const std::pair< KeyT, ValueT > &KV)
 
std::pair< iterator, boolinsert (std::pair< KeyT, ValueT > &&KV)
 
void insert (InputIt I, InputIt E)
 insert - Range insertion of pairs. More...
 
std::pair< iterator, booltry_emplace (KeyT &&Key, Ts &&...Args)
 
std::pair< iterator, booltry_emplace (const KeyT &Key, Ts &&...Args)
 
std::pair< iterator, boolinsert_as (std::pair< KeyT, ValueT > &&KV, const LookupKeyT &Val)
 Alternate version of insert() which allows a different, and possibly less expensive, key type. More...
 
bool erase (const KeyT &Val)
 
void erase (iterator I)
 
value_typeFindAndConstruct (const KeyT &Key)
 
value_typeFindAndConstruct (KeyT &&Key)
 
ValueToperator[] (const KeyT &Key)
 
ValueToperator[] (KeyT &&Key)
 
bool isPointerIntoBucketsArray (const void *Ptr) const
 isPointerIntoBucketsArray - Return true if the specified pointer points somewhere into the DenseMap's array of buckets (i.e. More...
 
const void * getPointerIntoBucketsArray () const
 getPointerIntoBucketsArray() - Return an opaque pointer into the buckets array. More...
 
size_t getMemorySize () const
 Return the approximate size (in bytes) of the actual map. More...
 
- Public Member Functions inherited from llvm::DebugEpochBase
 DebugEpochBase ()
 
void incrementEpoch ()
 Calling incrementEpoch invalidates all handles pointing into the calling instance. More...
 
 ~DebugEpochBase ()
 The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically. More...
 

Friends

class DenseMapBase< DenseMap, KeyT, ValueT, KeyInfoT, BucketT >
 

Additional Inherited Members

- Public Types inherited from llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >
typedef unsigned size_type
 
typedef KeyT key_type
 
typedef ValueT mapped_type
 
typedef BucketT value_type
 
typedef DenseMapIterator< KeyT,
ValueT, KeyInfoT, BucketT > 
iterator
 
typedef DenseMapIterator< KeyT,
ValueT, KeyInfoT, BucketT,
true
const_iterator
 
- Protected Member Functions inherited from llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >
 DenseMapBase ()=default
 
void destroyAll ()
 
void initEmpty ()
 
unsigned getMinBucketToReserveForEntries (unsigned NumEntries)
 Returns the number of buckets to allocate to ensure that the DenseMap can accommodate NumEntries without need to grow(). More...
 
void moveFromOldBuckets (BucketT *OldBucketsBegin, BucketT *OldBucketsEnd)
 
void copyFrom (const DenseMapBase< OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT > &other)
 
- Static Protected Member Functions inherited from llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >
static unsigned getHashValue (const KeyT &Val)
 
static unsigned getHashValue (const LookupKeyT &Val)
 
static const KeyT getEmptyKey ()
 
static const KeyT getTombstoneKey ()
 

Detailed Description

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
class llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >

Definition at line 583 of file DenseMap.h.

Constructor & Destructor Documentation

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::DenseMap ( unsigned  InitialReserve = 0)
inlineexplicit

Create a DenseMap wth an optional InitialReserve that guarantee that this number of elements can be inserted in the map without grow()

Definition at line 598 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::DenseMap ( const DenseMap< KeyT, ValueT, KeyInfoT, BucketT > &  other)
inline

Definition at line 600 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::DenseMap ( DenseMap< KeyT, ValueT, KeyInfoT, BucketT > &&  other)
inline

Definition at line 605 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
template<typename InputIt >
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::DenseMap ( const InputIt &  I,
const InputIt &  E 
)
inline

Definition at line 611 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::~DenseMap ( )
inline

Definition at line 616 of file DenseMap.h.

Member Function Documentation

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
void llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::copyFrom ( const DenseMap< KeyT, ValueT, KeyInfoT, BucketT > &  other)
inline
template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
void llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::grow ( unsigned  AtLeast)
inline

Definition at line 665 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
void llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::init ( unsigned  InitNumEntries)
inline
template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
DenseMap& llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::operator= ( const DenseMap< KeyT, ValueT, KeyInfoT, BucketT > &  other)
inline

Definition at line 630 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
DenseMap& llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::operator= ( DenseMap< KeyT, ValueT, KeyInfoT, BucketT > &&  other)
inline

Definition at line 636 of file DenseMap.h.

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
void llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::shrink_and_clear ( )
inline

Definition at line 682 of file DenseMap.h.

Referenced by llvm::AssumptionCacheTracker::releaseMemory().

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
void llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::swap ( DenseMap< KeyT, ValueT, KeyInfoT, BucketT > &  RHS)
inline

Friends And Related Function Documentation

template<typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = detail::DenseMapPair<KeyT, ValueT>>
friend class DenseMapBase< DenseMap, KeyT, ValueT, KeyInfoT, BucketT >
friend

Definition at line 588 of file DenseMap.h.


The documentation for this class was generated from the following file: