10 #ifndef LLVM_MC_STRINGTABLEBUILDER_H
11 #define LLVM_MC_STRINGTABLEBUILDER_H
30 bool Finalized =
false;
32 void finalizeStringTable(
bool Optimize);
64 void write(uint8_t *Buf)
const;
67 bool isFinalized()
const {
return Finalized; }
A container which contains a StringRef plus a precomputed hash.
Utility for building string tables with deduplicated suffixes.
size_t add(CachedHashStringRef S)
Add a string to the builder.
size_t getOffset(StringRef S) const
void finalizeInOrder()
Finalize the string table without reording it.
void finalize()
Analyze the strings and build the final table.
void write(raw_ostream &OS) const
size_t getOffset(CachedHashStringRef S) const
Get the offest of a string in the string table.
StringTableBuilder(Kind K, unsigned Alignment=1)
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.