29 return StringRef(reinterpret_cast<const char *>(LeafData.
data()),
39 bool FalseVal =
false;
44 if (Short < LF_NUMERIC) {
102 "Buffer contains invalid APSInt type");
122 "Data is not a numeric value!");
147 "Null terminated string buffer is empty!");
154 return readCVRecordFromStream<SymbolKind>(Stream,
Offset);
Error consume_numeric(BinaryStreamReader &Reader, uint64_t &Value)
Decodes a numeric leaf value that is known to be a particular type.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer...
This class represents lattice values for constants.
const unsigned char * bytes_end() const
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef take_back(size_t N=1) const
Return a StringRef equal to 'this' but with only the last N elements remaining.
Tagged union holding either a T or a Error.
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
This file implements a class to represent arbitrary precision integral constant values and operations...
size_t size() const
size - Get the array size.
bool isIntN(unsigned N) const
Check if this APInt has an N-bits unsigned integer value.
Expected< CVSymbol > readSymbolFromStream(BinaryStreamRef Stream, uint32_t Offset)
static ErrorSuccess success()
Create a success value.
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
Class for arbitrary precision integers.
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
StringRef getBytesAsCString(ArrayRef< uint8_t > LeafData)
const unsigned char * bytes_begin() const
uint64_t getLimitedValue(uint64_t Limit=UINT64_MAX) const
If this value is smaller than the specified limit, return it, otherwise return the limit value...
uint32_t bytesRemaining() const
Error consume(BinaryStreamReader &Reader)
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.