10 #ifndef LLVM_SUPPORT_BINARYSTREAM_H 11 #define LLVM_SUPPORT_BINARYSTREAM_H 84 virtual Error commit() = 0;
102 #endif // LLVM_SUPPORT_BINARYSTREAM_H #define LLVM_MARK_AS_BITMASK_ENUM(LargestValue)
LLVM_MARK_AS_BITMASK_ENUM lets you opt in an individual enum type so you can perform bitwise operatio...
This class represents lattice values for constants.
virtual Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef< uint8_t > &Buffer)=0
Given an offset into the stream and a number of bytes, attempt to read the bytes and set the output A...
Error checkOffsetForWrite(uint32_t Offset, uint32_t DataSize)
virtual ~BinaryStream()=default
Error checkOffsetForRead(uint32_t Offset, uint32_t DataSize)
virtual uint32_t getLength()=0
Return the number of bytes of data in this stream.
virtual llvm::support::endianness getEndian() const =0
virtual Error readLongestContiguousChunk(uint32_t Offset, ArrayRef< uint8_t > &Buffer)=0
Given an offset into the stream, read as much as possible without copying any data.
An interface for accessing data in a stream-like format, but which discourages copying.
BinaryStreamFlags getFlags() const override
Return the properties of this stream.
static ErrorSuccess success()
Create a success value.
virtual BinaryStreamFlags getFlags() const
Return the properties of this stream.
Lightweight error class with error context and mandatory checking.
A BinaryStream which can be read from as well as written to.