LLVM 22.0.0git
llvm::StringMapEntryBase Class Reference

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

#include "llvm/ADT/StringMapEntry.h"

Inheritance diagram for llvm::StringMapEntryBase:
[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()

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, assert(), and llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key.

Referenced by llvm::StringMapEntry< std::nullopt_t >::create().

◆ getKeyLength()


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