28 return StringRef(
reinterpret_cast<const char *
>(LeafData.
data()),
38 bool FalseVal =
false;
43 if (Short < LF_NUMERIC) {
100 return make_error<CodeViewError>(cv_error_code::corrupt_record,
101 "Buffer contains invalid APSInt type");
119 if (
N.isSigned() || !
N.isIntN(64))
120 return make_error<CodeViewError>(cv_error_code::corrupt_record,
121 "Data is not a numeric value!");
122 Num =
N.getLimitedValue();
145 return make_error<CodeViewError>(cv_error_code::corrupt_record,
146 "Null terminated string buffer is empty!");
153 return readCVRecordFromStream<SymbolKind>(Stream,
Offset);
This file implements a class to represent arbitrary precision integral constant values and operations...
This file implements the APSInt class, which is a simple class that represents an arbitrary sized int...
Class for arbitrary precision integers.
An arbitrary precision integer that knows its signedness.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
Provides read only access to a subclass of BinaryStream.
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
uint64_t bytesRemaining() const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
Error consume_numeric(BinaryStreamReader &Reader, uint64_t &Value)
Decodes a numeric leaf value that is known to be a particular type.
Error consume(BinaryStreamReader &Reader)
StringRef getBytesAsCString(ArrayRef< uint8_t > LeafData)
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
Expected< CVSymbol > readSymbolFromStream(BinaryStreamRef Stream, uint32_t Offset)
This is an optimization pass for GlobalISel generic memory operations.