LLVM  4.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::StringMapEntry< ValueTy > Class Template Reference

StringMapEntry - This is used to represent one value that is inserted into a StringMap. More...

#include <StringMap.h>

Inheritance diagram for llvm::StringMapEntry< ValueTy >:
[legend]
Collaboration diagram for llvm::StringMapEntry< ValueTy >:
[legend]

Public Member Functions

 StringMapEntry (unsigned strLen)
 
template<typename... InitTy>
 StringMapEntry (unsigned strLen, InitTy &&...InitVals)
 
 StringMapEntry (StringMapEntry &E)=delete
 
StringRef getKey () const
 
const ValueTy & getValue () const
 
ValueTy & getValue ()
 
void setValue (const ValueTy &V)
 
const char * getKeyData () const
 getKeyData - Return the start of the string data that is the key for this value. More...
 
StringRef first () const
 
template<typename AllocatorTy >
void Destroy (AllocatorTy &Allocator)
 Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator. More...
 
void Destroy ()
 Destroy this object, releasing memory back to the malloc allocator. More...
 
- Public Member Functions inherited from llvm::StringMapEntryBase
 StringMapEntryBase (unsigned Len)
 
unsigned getKeyLength () const
 

Static Public Member Functions

template<typename AllocatorTy , typename... InitTy>
static StringMapEntryCreate (StringRef Key, AllocatorTy &Allocator, InitTy &&...InitVals)
 Create a StringMapEntry for the specified key construct the value using InitiVals. More...
 
template<typename... InitType>
static StringMapEntryCreate (StringRef Key, InitType &&...InitVal)
 Create - Create a StringMapEntry with normal malloc/free. More...
 
static StringMapEntryCreate (StringRef Key)
 
static StringMapEntryGetStringMapEntryFromKeyData (const char *KeyData)
 GetStringMapEntryFromKeyData - Given key data that is known to be embedded into a StringMapEntry, return the StringMapEntry itself. More...
 

Public Attributes

ValueTy second
 

Detailed Description

template<typename ValueTy>
class llvm::StringMapEntry< ValueTy >

StringMapEntry - This is used to represent one value that is inserted into a StringMap.

It contains the Value itself and the key: the string length and data.

Definition at line 36 of file StringMap.h.

Constructor & Destructor Documentation

template<typename ValueTy>
llvm::StringMapEntry< ValueTy >::StringMapEntry ( unsigned  strLen)
inlineexplicit
template<typename ValueTy>
template<typename... InitTy>
llvm::StringMapEntry< ValueTy >::StringMapEntry ( unsigned  strLen,
InitTy &&...  InitVals 
)
inline

Definition at line 135 of file StringMap.h.

template<typename ValueTy>
llvm::StringMapEntry< ValueTy >::StringMapEntry ( StringMapEntry< ValueTy > &  E)
delete

Member Function Documentation

template<typename ValueTy>
template<typename AllocatorTy , typename... InitTy>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( StringRef  Key,
AllocatorTy &  Allocator,
InitTy &&...  InitVals 
)
inlinestatic

Create a StringMapEntry for the specified key construct the value using InitiVals.

Definition at line 158 of file StringMap.h.

Referenced by llvm::StringMapEntry< bool >::Create(), llvm::StringPool::intern(), llvm::StringMap< uint64_t >::StringMap(), and llvm::StringMap< uint64_t >::try_emplace().

template<typename ValueTy>
template<typename... InitType>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( StringRef  Key,
InitType &&...  InitVal 
)
inlinestatic

Create - Create a StringMapEntry with normal malloc/free.

Definition at line 184 of file StringMap.h.

template<typename ValueTy>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( StringRef  Key)
inlinestatic

Definition at line 189 of file StringMap.h.

template<typename ValueTy>
template<typename AllocatorTy >
void llvm::StringMapEntry< ValueTy >::Destroy ( AllocatorTy &  Allocator)
inline

Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator.

Definition at line 203 of file StringMap.h.

Referenced by llvm::PooledStringPtr::clear(), and llvm::StringMap< uint64_t >::erase().

template<typename ValueTy>
void llvm::StringMapEntry< ValueTy >::Destroy ( )
inline

Destroy this object, releasing memory back to the malloc allocator.

Definition at line 212 of file StringMap.h.

Referenced by llvm::StringMapEntry< bool >::Destroy().

template<typename ValueTy>
StringRef llvm::StringMapEntry< ValueTy >::first ( ) const
inline

Definition at line 153 of file StringMap.h.

Referenced by llvm::MCSymbol::getName().

template<typename ValueTy>
StringRef llvm::StringMapEntry< ValueTy >::getKey ( ) const
inline

Definition at line 139 of file StringMap.h.

Referenced by llvm::Value::getName(), and llvm::StringMap< uint64_t >::insert().

template<typename ValueTy>
const char* llvm::StringMapEntry< ValueTy >::getKeyData ( ) const
inline

getKeyData - Return the start of the string data that is the key for this value.

The string data is always stored immediately after the StringMapEntry object.

Definition at line 151 of file StringMap.h.

Referenced by llvm::PooledStringPtr::begin(), llvm::PooledStringPtr::end(), llvm::StringMapEntry< bool >::first(), llvm::TargetIntrinsicInfo::getIntrinsicID(), and llvm::StringMapEntry< bool >::getKey().

template<typename ValueTy>
static StringMapEntry& llvm::StringMapEntry< ValueTy >::GetStringMapEntryFromKeyData ( const char *  KeyData)
inlinestatic

GetStringMapEntryFromKeyData - Given key data that is known to be embedded into a StringMapEntry, return the StringMapEntry itself.

Definition at line 195 of file StringMap.h.

template<typename ValueTy>
const ValueTy& llvm::StringMapEntry< ValueTy >::getValue ( ) const
inline
template<typename ValueTy>
ValueTy& llvm::StringMapEntry< ValueTy >::getValue ( )
inline

Definition at line 144 of file StringMap.h.

template<typename ValueTy>
void llvm::StringMapEntry< ValueTy >::setValue ( const ValueTy &  V)
inline

Definition at line 146 of file StringMap.h.

Referenced by llvm::Value::takeName().

Member Data Documentation

template<typename ValueTy>
ValueTy llvm::StringMapEntry< ValueTy >::second

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