LLVM  14.0.0git
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]
Collaboration diagram for llvm::StringMapEntry< ValueTy >:
Collaboration graph
[legend]

Public Member Functions

StringRef getKey () const
 
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...
 
- 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. More...
 
static StringMapEntryGetStringMapEntryFromKeyData (const char *keyData)
 GetStringMapEntryFromKeyData - Given key data that is known to be embedded into a StringMapEntry, return the StringMapEntry itself. More...
 

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. More...
 

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

Referenced by llvm::StringMap< std::unique_ptr< llvm::vfs::detail::InMemoryNode > >::erase().

◆ first()

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

Definition at line 113 of file StringMapEntry.h.

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

Referenced by llvm::StringMapEntry< llvm::Comdat >::first(), llvm::TargetIntrinsicInfo::getIntrinsicID(), and llvm::StringMapEntry< llvm::Comdat >::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 129 of file StringMapEntry.h.


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