LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::StringMapEntry< ValueTy > Class Template Referencefinal

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

#include "llvm/ADT/StringMapEntry.h"

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

Public Types

using ValueType = ValueTy
 

Public Member Functions

StringRef getKey () const
 
const chargetKeyData () const
 getKeyData - Return the start of the string data that is the key for this value.
 
StringRef first () const
 
template<typename AllocatorTy >
void Destroy (AllocatorTy &allocator)
 Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator.
 
- Public Member Functions inherited from llvm::StringMapEntryStorage< ValueTy >
 StringMapEntryStorage (size_t keyLength)
 
template<typename... InitTy>
 StringMapEntryStorage (size_t keyLength, InitTy &&...initVals)
 
 StringMapEntryStorage (StringMapEntryStorage &e)=delete
 
const ValueTy & getValue () const
 
ValueTy & getValue ()
 
void setValue (const ValueTy &V)
 
- Public Member Functions inherited from llvm::StringMapEntryBase
 StringMapEntryBase (size_t keyLength)
 
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.
 
static StringMapEntryGetStringMapEntryFromKeyData (const char *keyData)
 GetStringMapEntryFromKeyData - Given key data that is known to be embedded into a StringMapEntry, return the StringMapEntry itself.
 

Additional Inherited Members

- Public Attributes inherited from llvm::StringMapEntryStorage< ValueTy >
ValueTy second
 
- Static Protected Member Functions inherited from llvm::StringMapEntryBase
template<typename AllocatorTy >
static void * allocateWithKey (size_t EntrySize, size_t EntryAlign, StringRef Key, AllocatorTy &Allocator)
 Helper to tail-allocate Key.
 

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 102 of file StringMapEntry.h.

Member Typedef Documentation

◆ ValueType

template<typename ValueTy >
using llvm::StringMapEntry< ValueTy >::ValueType = ValueTy

Definition at line 106 of file StringMapEntry.h.

Member Function Documentation

◆ create()

template<typename ValueTy >
template<typename AllocatorTy , typename... InitTy>
static StringMapEntry * llvm::StringMapEntry< ValueTy >::create ( StringRef  key,
AllocatorTy &  allocator,
InitTy &&...  initVals 
)
inlinestatic

◆ Destroy()

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 142 of file StringMapEntry.h.

References allocator, and llvm::StringMapEntryBase::getKeyLength().

◆ first()

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

◆ 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 115 of file StringMapEntry.h.

Referenced by llvm::StringMapEntry< ValueTy >::first(), llvm::TargetIntrinsicInfo::getIntrinsicID(), and llvm::StringMapEntry< ValueTy >::getKey().

◆ 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 135 of file StringMapEntry.h.


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