class NonRelocatableStringpool
Declaration
class NonRelocatableStringpool { /* full declaration omitted */ };
Description
A string table that doesn't need relocations. Use this class when a string table doesn't need relocations. This class provides this ability by just associating offsets with strings.
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:23
Method Overview
- public NonRelocatableStringpool(std::function<StringRef (StringRef)> Translator = nullptr, bool PutEmptyString = false)
- public std::vector<DwarfStringPoolEntryRef> getEntriesForEmission() const
- public llvm::DwarfStringPoolEntryRef getEntry(llvm::StringRef S)
- public uint64_t getSize()
- public uint32_t getStringOffset(llvm::StringRef S)
- public llvm::StringRef internString(llvm::StringRef S)
Methods
¶NonRelocatableStringpool(
std::function<StringRef(StringRef)>
Translator = nullptr,
bool PutEmptyString = false)
NonRelocatableStringpool(
std::function<StringRef(StringRef)>
Translator = nullptr,
bool PutEmptyString = false)
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:30
Parameters
- std::function<StringRef(StringRef)> Translator = nullptr
- bool PutEmptyString = false
¶std::vector<DwarfStringPoolEntryRef>
getEntriesForEmission() const
std::vector<DwarfStringPoolEntryRef>
getEntriesForEmission() const
Description
Return the list of strings to be emitted. This does not contain the strings which were added via internString only.
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:56
¶llvm::DwarfStringPoolEntryRef getEntry(
llvm::StringRef S)
llvm::DwarfStringPoolEntryRef getEntry(
llvm::StringRef S)
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:38
Parameters
¶uint64_t getSize()
uint64_t getSize()
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:52
¶uint32_t getStringOffset(llvm::StringRef S)
uint32_t getStringOffset(llvm::StringRef S)
Description
Get the offset of string \p S in the string table. This can insert a new element or return the offset of a pre-existing one.
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:42
Parameters
¶llvm::StringRef internString(llvm::StringRef S)
llvm::StringRef internString(llvm::StringRef S)
Description
Get permanent storage for \p S (but do not necessarily emit \p S in the output section). A latter call to getStringOffset() with the same string will chain it though.
Declared at: llvm/include/llvm/CodeGen/NonRelocatableStringpool.h:50
Parameters
Returns
The StringRef that points to permanent storage to use in place of \p S.