21 Limit.MaxLength = MaxLength;
22 Limit.BeginOffset = getCurrentOffset();
53 Min = (Min.
hasValue()) ? std::min(*Min, *ThisMin) : *ThisMin;
55 assert(Min.
hasValue() &&
"Every field must have a maximum length!");
72 uint8_t Leaf = Reader->
peek();
77 unsigned BytesToAdvance = Leaf & 0x0F;
78 return Reader->
skip(BytesToAdvance);
97 Bytes.assign(BytesRef.
begin(), BytesRef.
end());
119 if (
auto EC = writeEncodedUnsignedInteger(static_cast<uint64_t>(Value)))
122 if (
auto EC = writeEncodedSignedInteger(Value))
137 if (
auto EC = writeEncodedUnsignedInteger(Value))
152 return writeEncodedUnsignedInteger(Value.
getZExtValue());
155 return consume(*Reader, Value);
181 if (
auto EC = Reader->
readBytes(GuidBytes, GuidSize))
190 for (
auto V : Value) {
209 Error CodeViewRecordIO::writeEncodedSignedInteger(
const int64_t &
Value) {
210 assert(Value < 0 &&
"Encoded integer is not signed!");
211 if (Value >= std::numeric_limits<int8_t>::min()) {
216 }
else if (Value >= std::numeric_limits<int16_t>::min()) {
221 }
else if (Value >= std::numeric_limits<int32_t>::min()) {
235 Error CodeViewRecordIO::writeEncodedUnsignedInteger(
const uint64_t &
Value) {
236 if (Value < LF_NUMERIC) {
Error mapByteVectorTail(ArrayRef< uint8_t > &Bytes)
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
Error padToAlignment(uint32_t Align)
Error writeBytes(ArrayRef< uint8_t > Buffer)
Write the bytes specified in Buffer to the underlying stream.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
uint64_t getZExtValue() const
Get zero extended value.
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
This class represents lattice values for constants.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
void push_back(const T &Elt)
Error mapInteger(TypeIndex &TypeInd)
Error mapStringZVectorZ(std::vector< StringRef > &Value)
uint8_t peek() const
Examine the next byte of the underlying stream without advancing the stream's offset.
Error mapGuid(GUID &Guid)
void setIndex(uint32_t I)
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Error beginRecord(Optional< uint32_t > MaxLength)
This represents the 'GUID' type from windows.h.
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
int64_t getSExtValue() const
Get sign extended value.
uint32_t maxFieldLength() const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Error padToAlignment(uint32_t Align)
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
uint32_t getIndex() const
Error writeCString(StringRef Str)
Write the string Str to the underlying stream followed by a null terminator.
int64_t getExtValue() const
Get the correctly-extended int64_t value.
static ErrorSuccess success()
Create a success value.
Error mapEncodedInteger(int64_t &Value)
Error readBytes(ArrayRef< uint8_t > &Buffer, uint32_t Size)
Read Size bytes from the underlying stream at the current offset and and set Buffer to the resulting ...
LLVM_NODISCARD bool empty() const
Error padToAlignment(uint32_t Align)
Error skip(uint32_t Amount)
Advance the stream's offset by Amount bytes.
uint32_t bytesRemaining() const
Error mapStringZ(StringRef &Value)
Error consume(BinaryStreamReader &Reader)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Lightweight error class with error context and mandatory checking.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef take_front(size_t N=1) const
Return a StringRef equal to 'this' but with only the first N elements remaining.
StringRef - Represent a constant reference to a string, i.e.