23bool ContiguousBlobAccumulator::checkLimit(
uint64_t Size) {
28 "reached the output size limit");
38 uint64_t PaddingSize = AlignedOffset - CurrentOffset;
39 if (!checkLimit(PaddingSize))
48 if (!checkLimit(
Bin.binary_size()))
50 Bin.writeAsBinary(OS,
N);
68 memcpy(&Buf[Pos - InitialOffset],
Data,
Size);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines ContiguousBlobAccumulator, the size-limited output buffer shared by the yaml2obj em...
Specialized YAMLIO scalar type for representing a binary blob.
LLVM_ABI uint64_t padToAlignment(unsigned Align)
LLVM_ABI unsigned writeSLEB128(int64_t Val)
LLVM_ABI void writeAsBinary(const BinaryRef &Bin, uint64_t N=UINT64_MAX)
uint64_t getOffset() const
void writeZeros(uint64_t Num)
LLVM_ABI unsigned writeULEB128(uint64_t Val)
LLVM_ABI void updateDataAt(uint64_t Pos, void *Data, size_t Size)
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
constexpr uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a SLEB128 value to an output stream.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.
This struct is a compact representation of a valid (non-zero power of two) alignment.