class AppendingBinaryByteStream

Declaration

class AppendingBinaryByteStream : public WritableBinaryStream { /* full declaration omitted */ };

Description

An implementation of WritableBinaryStream which can write at its end causing the underlying data to grow. This class owns the underlying data.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:135

Inherits from: WritableBinaryStream

Method Overview

Inherited from WritableBinaryStream:

Inherited from BinaryStream:

Methods

AppendingBinaryByteStream()

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:140

AppendingBinaryByteStream(
    llvm::support::endianness Endian)

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:141

Parameters

llvm::support::endianness Endian

void clear()

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:144

llvm::Error commit()

Description

For buffered streams, commits changes to the backing store.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:193

MutableArrayRef<uint8_t> data()

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:200

llvm::support::endianness getEndian() const

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:146

virtual llvm::BinaryStreamFlags getFlags() const

Description

Return the properties of this stream.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:196

uint32_t getLength()

Description

Return the number of bytes of data in this stream.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:170

void insert(uint32_t Offset,
            ArrayRef<uint8_t> Bytes)

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:157

Parameters

uint32_t Offset
ArrayRef<uint8_t> Bytes

llvm::Error readBytes(uint32_t Offset,
                      uint32_t Size,
                      ArrayRef<uint8_t>& Buffer)

Description

Given an offset into the stream and a number of bytes, attempt to read the bytes and set the output ArrayRef to point to data owned by the stream.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:148

Parameters

uint32_t Offset
uint32_t Size
ArrayRef<uint8_t>& Buffer

llvm::Error readLongestContiguousChunk(
    uint32_t Offset,
    ArrayRef<uint8_t>& Buffer)

Description

Given an offset into the stream, read as much as possible without copying any data.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:161

Parameters

uint32_t Offset
ArrayRef<uint8_t>& Buffer

llvm::Error writeBytes(uint32_t Offset,
                       ArrayRef<uint8_t> Buffer)

Description

Attempt to write the given bytes into the stream at the desired offset. This will always necessitate a copy. Cannot shrink or grow the stream, only writes into existing allocated space.

Declared at: llvm/include/llvm/Support/BinaryByteStream.h:172

Parameters

uint32_t Offset
ArrayRef<uint8_t> Buffer