21 using namespace llvm::codeview;
49 auto P = Strings.
insert({S, StringSize});
54 StringSize += S.
size() + 1;
55 return P.first->second;
70 for (
auto &Pair : Strings) {
80 assert((End - Begin) == StringSize);
87 auto Iter = Strings.
find(S);
uint32_t calculateSerializedSize() const override
iterator find(StringRef Key)
Error commit(BinaryStreamWriter &Writer) const override
uint32_t getOffset() const
Tagged union holding either a T or a Error.
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
DebugStringTableSubsection()
Provides write only access to a subclass of WritableBinaryStream.
static const unsigned End
Error writeCString(StringRef Str)
Write the the string Str to the underlying stream followed by a null terminator.
void setOffset(uint32_t Off)
Expected< StringRef > getString(uint32_t Offset) const
static ErrorSuccess success()
Create a success value.
uint32_t getStringId(StringRef S) const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
Error initialize(BinaryStreamRef Contents)
void setOffset(uint32_t Off)
uint32_t insert(StringRef S)
Error readStreamRef(BinaryStreamRef &Ref)
Read the entire remainder of the underlying stream into Ref.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
DebugStringTableSubsectionRef()
Lightweight error class with error context and mandatory checking.
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.