LLVM 20.0.0git
Public Member Functions | Static Protected Member Functions | List of all members
llvm::StringMapEntryBase Class Reference

StringMapEntryBase - Shared base class of StringMapEntry instances. More...

#include "llvm/ADT/StringMapEntry.h"

Inheritance diagram for llvm::StringMapEntryBase:
Inheritance graph
[legend]

Public Member Functions

 StringMapEntryBase (size_t keyLength)
 
size_t getKeyLength () const
 

Static Protected Member Functions

template<typename AllocatorTy >
static void * allocateWithKey (size_t EntrySize, size_t EntryAlign, StringRef Key, AllocatorTy &Allocator)
 Helper to tail-allocate Key.
 

Detailed Description

StringMapEntryBase - Shared base class of StringMapEntry instances.

Definition at line 25 of file StringMapEntry.h.

Constructor & Destructor Documentation

◆ StringMapEntryBase()

llvm::StringMapEntryBase::StringMapEntryBase ( size_t  keyLength)
inlineexplicit

Definition at line 29 of file StringMapEntry.h.

Member Function Documentation

◆ allocateWithKey()

template<typename AllocatorTy >
void * llvm::StringMapEntryBase::allocateWithKey ( size_t  EntrySize,
size_t  EntryAlign,
StringRef  Key,
AllocatorTy &  Allocator 
)
staticprotected

Helper to tail-allocate Key.

It'd be nice to generalize this so it could be reused elsewhere, maybe even taking an llvm::function_ref to type-erase the allocator and put it in a source file.

Definition at line 44 of file StringMapEntry.h.

References Allocator, and assert().

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

◆ getKeyLength()

size_t llvm::StringMapEntryBase::getKeyLength ( ) const
inline

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