LLVM 20.0.0git
|
StringToOffsetTable - This class uniques a bunch of nul-terminated strings and keeps track of their offset in a massive contiguous string allocation. More...
#include "llvm/TableGen/StringToOffsetTable.h"
Public Member Functions | |
bool | empty () const |
size_t | size () const |
unsigned | GetOrAddStringOffset (StringRef Str, bool appendZero=true) |
std::optional< unsigned > | GetStringOffset (StringRef Str) const |
void | EmitStringLiteralDef (raw_ostream &OS, const Twine &Decl, const Twine &Indent=" ") const |
void | EmitString (raw_ostream &O) const |
void | EmitCharArray (raw_ostream &O) |
Emit the string using character literals. | |
StringToOffsetTable - This class uniques a bunch of nul-terminated strings and keeps track of their offset in a massive contiguous string allocation.
It can then output this string blob and use indexes into the string to reference each piece.
Definition at line 25 of file StringToOffsetTable.h.
|
inline |
Emit the string using character literals.
MSVC has a limitation that string literals cannot be longer than 64K.
Definition at line 112 of file StringToOffsetTable.h.
|
inline |
Definition at line 75 of file StringToOffsetTable.h.
|
inline |
Definition at line 56 of file StringToOffsetTable.h.
References llvm::formatv(), and OS.
|
inline |
Definition at line 30 of file StringToOffsetTable.h.
References llvm::StringMapImpl::empty().
|
inline |
Definition at line 33 of file StringToOffsetTable.h.
References II, llvm::StringMap< ValueTy, AllocatorTy >::insert(), and size().
Definition at line 47 of file StringToOffsetTable.h.
References llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), and II.
|
inline |
Definition at line 31 of file StringToOffsetTable.h.
Referenced by GetOrAddStringOffset().