LLVM API Documentation

llvm::StringMapEntry< ValueTy > Class Template Reference

#include <StringMap.h>

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

List of all members.

Public Member Functions

 StringMapEntry (unsigned strLen)
 StringMapEntry (unsigned strLen, const ValueTy &V)
StringRef getKey () const
const ValueTy & getValue () const
ValueTy & getValue ()
void setValue (const ValueTy &V)
const char * getKeyData () const
const char * first () const
template<typename AllocatorTy>
void Destroy (AllocatorTy &Allocator)
void Destroy ()
 Destroy this object, releasing memory back to the malloc allocator.

Static Public Member Functions

template<typename AllocatorTy, typename InitType>
static StringMapEntry * Create (const char *KeyStart, const char *KeyEnd, AllocatorTy &Allocator, InitType InitVal)
template<typename AllocatorTy>
static StringMapEntry * Create (const char *KeyStart, const char *KeyEnd, AllocatorTy &Allocator)
template<typename InitType>
static StringMapEntry * Create (const char *KeyStart, const char *KeyEnd, InitType InitVal)
 Create - Create a StringMapEntry with normal malloc/free.
static StringMapEntry * Create (const char *KeyStart, const char *KeyEnd)
static StringMapEntry & GetStringMapEntryFromValue (ValueTy &V)
static const StringMapEntry & GetStringMapEntryFromValue (const ValueTy &V)

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


Constructor & Destructor Documentation

template<typename ValueTy>
llvm::StringMapEntry< ValueTy >::StringMapEntry ( unsigned  strLen  )  [inline, explicit]

Definition at line 135 of file StringMap.h.

Referenced by llvm::StringMapEntry< ValueTy >::Create().

template<typename ValueTy>
llvm::StringMapEntry< ValueTy >::StringMapEntry ( unsigned  strLen,
const ValueTy &  V 
) [inline]

Definition at line 137 of file StringMap.h.


Member Function Documentation

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

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

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

Definition at line 145 of file StringMap.h.

References llvm::StringMapEntry< ValueTy >::second.

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

Definition at line 147 of file StringMap.h.

References llvm::StringMapEntry< ValueTy >::second.

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

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

Referenced by llvm::PooledStringPtr::begin(), llvm::PooledStringPtr::end(), llvm::StringMapEntry< ValueTy >::first(), llvm::MDString::get(), llvm::Function::getIntrinsicID(), llvm::StringMapEntry< ValueTy >::getKey(), and WriteValueSymbolTable().

template<typename ValueTy>
const char* llvm::StringMapEntry< ValueTy >::first (  )  const [inline]

Definition at line 154 of file StringMap.h.

References llvm::StringMapEntry< ValueTy >::getKeyData().

template<typename ValueTy>
template<typename AllocatorTy, typename InitType>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( const char *  KeyStart,
const char *  KeyEnd,
AllocatorTy &  Allocator,
InitType  InitVal 
) [inline, static]

template<typename ValueTy>
template<typename AllocatorTy>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( const char *  KeyStart,
const char *  KeyEnd,
AllocatorTy &  Allocator 
) [inline, static]

Definition at line 189 of file StringMap.h.

References llvm::StringMapEntry< ValueTy >::Create().

template<typename ValueTy>
template<typename InitType>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( const char *  KeyStart,
const char *  KeyEnd,
InitType  InitVal 
) [inline, static]

Create - Create a StringMapEntry with normal malloc/free.

Definition at line 197 of file StringMap.h.

References A, and llvm::StringMapEntry< ValueTy >::Create().

template<typename ValueTy>
static StringMapEntry* llvm::StringMapEntry< ValueTy >::Create ( const char *  KeyStart,
const char *  KeyEnd 
) [inline, static]

Definition at line 203 of file StringMap.h.

References llvm::StringMapEntry< ValueTy >::Create().

template<typename ValueTy>
static StringMapEntry& llvm::StringMapEntry< ValueTy >::GetStringMapEntryFromValue ( ValueTy &  V  )  [inline, static]

GetStringMapEntryFromValue - Given a value that is known to be embedded into a StringMapEntry, return the StringMapEntry itself.

Definition at line 209 of file StringMap.h.

References llvm::StringMapEntry< ValueTy >::second.

Referenced by llvm::StringMapEntry< ValueTy >::GetStringMapEntryFromValue().

template<typename ValueTy>
static const StringMapEntry& llvm::StringMapEntry< ValueTy >::GetStringMapEntryFromValue ( const ValueTy &  V  )  [inline, static]

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

Referenced by llvm::PooledStringPtr::clear(), llvm::StringMap< llvm::StringPool::PooledString >::erase(), llvm::Value::setName(), llvm::Value::takeName(), and llvm::Value::~Value().

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

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

Definition at line 230 of file StringMap.h.

References A.


Member Data Documentation

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


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