llvm::MutableBinaryByteStream

Writable BinaryStream backed by a single contiguous mutable buffer.

Synopsis

Declared in <llvm/Support/BinaryByteStream.h>

class MutableBinaryByteStream
    : public WritableBinaryStream

Description

As with BinaryByteStream, the mutable version also guarantees that no read operation will ever incur a copy, and similarly it does not own the underlying buffer.

Base Classes

NameDescription
WritableBinaryStreamA BinaryStream that supports both reading and writing.

Member Functions

NameDescription
MutableBinaryByteStream [constructor]Constructors
commit [virtual]Commit buffered changes; always succeeds for this in-memory stream.
data Return the underlying contiguous mutable data buffer.
getEndian [virtual]Return the endianness of multi-byte values in this stream.
getFlags [virtual]Return the properties of this stream.
getLength [virtual]Return the number of bytes in this stream.
readBytes [virtual]Read Size bytes starting at Offset without copying.
readLongestContiguousChunk [virtual]Read the longest contiguous chunk starting at Offset without copying.
writeBytes [virtual]Write Buffer into the stream at Offset without resizing.

Protected Member Functions

NameDescription
checkOffsetForRead Check that Offset and DataSize form a valid read range.
checkOffsetForWrite Check that Offset and DataSize form a valid write range.