9 #ifndef LLVM_DEBUGINFO_GSYM_STRINGTABLE_H 10 #define LLVM_DEBUGINFO_GSYM_STRINGTABLE_H 30 if (Offset < Data.
size()) {
31 auto End = Data.
find(
'\0', Offset);
32 return Data.
substr(Offset, End - Offset);
40 OS <<
"String table:\n";
43 while (Offset < Size) {
45 OS <<
HEX32(Offset) <<
": \"" << Str <<
"\"\n";
46 Offset += Str.size() + 1;
53 #endif // #ifndef LLVM_DEBUGINFO_GSYM_STRINGTABLE_H StringRef operator[](size_t Offset) const
This class represents lattice values for constants.
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
LLVM_NODISCARD size_t size() const
size - Get the string size.
LLVM_NODISCARD size_t find(char C, size_t From=0) const
Search for the first character C in the string.
String tables in GSYM files are required to start with an empty string at offset zero.
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
StringRef getString(uint32_t Offset) const
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.
raw_ostream & operator<<(raw_ostream &OS, const FunctionInfo &R)