LLVM  8.0.1
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 "llvm/ADT/StringMap.h"

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

Public Member Functions

 StringMapEntry (size_t strLen)
 
template<typename... InitTy>
 StringMapEntry (size_t strLen, InitTy &&... InitVals)
 
 StringMapEntry (StringMapEntry &E)=delete
 
StringRef getKey () const
 
const ValueTy & getValue () const
 
ValueTy & getValue ()
 
void setValue (const ValueTy &V)
 
const chargetKeyData () 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 (size_t Len)
 
size_t 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 126 of file StringMap.h.

Constructor & Destructor Documentation

◆ StringMapEntry() [1/3]

template<typename ValueTy>
llvm::StringMapEntry< ValueTy >::StringMapEntry ( size_t  strLen)
inlineexplicit

Definition at line 130 of file StringMap.h.

◆ StringMapEntry() [2/3]

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

Definition at line 133 of file StringMap.h.

◆ StringMapEntry() [3/3]

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

Member Function Documentation

◆ Create() [1/3]

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 156 of file StringMap.h.

Referenced by llvm::Value::getName(), and llvm::StringPool::intern().

◆ Create() [2/3]

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 182 of file StringMap.h.

◆ Create() [3/3]

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

Definition at line 187 of file StringMap.h.

◆ Destroy() [1/2]

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 201 of file StringMap.h.

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

◆ Destroy() [2/2]

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

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

Definition at line 209 of file StringMap.h.

◆ first()

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

Definition at line 151 of file StringMap.h.

Referenced by setImmutableRefs().

◆ getKey()

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

◆ getKeyData()

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 149 of file StringMap.h.

Referenced by llvm::PooledStringPtr::begin(), llvm::StringMapEntry< llvm::Comdat >::Create(), llvm::PooledStringPtr::end(), and llvm::TargetIntrinsicInfo::getIntrinsicID().

◆ GetStringMapEntryFromKeyData()

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 193 of file StringMap.h.

◆ getValue() [1/2]

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

◆ getValue() [2/2]

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

Definition at line 142 of file StringMap.h.

◆ setValue()

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

Definition at line 144 of file StringMap.h.

Referenced by llvm::Value::getName(), and llvm::Value::takeName().

Member Data Documentation

◆ second

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

Definition at line 128 of file StringMap.h.

Referenced by setImmutableRefs().


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