22 using namespace llvm::codeview;
23 using namespace llvm::support;
28 return StringRef(reinterpret_cast<const char *>(LeafData.
data()),
38 bool FalseVal =
false;
43 if (Short < LF_NUMERIC) {
101 "Buffer contains invalid APSInt type");
121 "Data is not a numeric value!");
146 "Null terminated string buffer is empty!");
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...
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.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
const unsigned char * bytes_end() 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...
bool isIntN(unsigned N) const
Check if this APInt has an N-bits unsigned integer value.
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.
uint32_t bytesRemaining() const
static ErrorSuccess success()
Create a success value.
Class for arbitrary precision integers.
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
StringRef getBytesAsCString(ArrayRef< uint8_t > LeafData)
Error consume(BinaryStreamReader &Reader)
const unsigned char * bytes_begin() const
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.