LLVM: llvm::StringToOffsetTable Class Reference (original) (raw)
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](StringToOffsetTable%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| StringToOffsetTable (bool AppendZero=true, StringRef ClassPrefix="", bool UsePrefixForStorageMember=true) | |
| bool | empty () const |
| size_t | size () const |
| unsigned | GetOrAddStringOffset (StringRef Str) |
| std::optional< unsigned > | GetStringOffset (StringRef Str) const |
| void | EmitStringTableDef (raw_ostream &OS, const Twine &Name) const |
| void | EmitString (raw_ostream &O) const |
Detailed Description
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 23 of file StringToOffsetTable.h.
Constructor & Destructor Documentation
| llvm::StringToOffsetTable::StringToOffsetTable ( bool AppendZero = true, StringRef ClassPrefix = "", bool UsePrefixForStorageMember = true ) | inline |
|---|
Member Function Documentation
◆ EmitString()
| void StringToOffsetTable::EmitString | ( | raw_ostream & | O | ) | const |
|---|
◆ EmitStringTableDef()
Definition at line 29 of file StringToOffsetTable.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::CallingConv::C, llvm::EmitLongStrLiterals, llvm::formatv(), llvm::SmallVectorTemplateCommon< T, typename >::front(), llvm::SmallVectorTemplateBase< T, bool >::pop_back(), llvm::PrintFatalError(), llvm::split(), and llvm::raw_ostream::write_escaped().
◆ empty()
| bool llvm::StringToOffsetTable::empty ( ) const | inline |
|---|
◆ GetOrAddStringOffset()
◆ GetStringOffset()
| std::optional< unsigned > llvm::StringToOffsetTable::GetStringOffset ( StringRef Str) const | inline |
|---|
◆ size()
| size_t llvm::StringToOffsetTable::size ( ) const | inline |
|---|
The documentation for this class was generated from the following files:
- include/llvm/TableGen/StringToOffsetTable.h
- lib/TableGen/StringToOffsetTable.cpp