LLVM 20.0.0git
|
An implementation of BinaryStream whose data is backed by an llvm MemoryBuffer object. More...
#include "llvm/Support/BinaryByteStream.h"
Public Member Functions | |
MemoryBufferByteStream (std::unique_ptr< MemoryBuffer > Buffer, llvm::endianness Endian) | |
Public Member Functions inherited from llvm::BinaryByteStream | |
BinaryByteStream ()=default | |
BinaryByteStream (ArrayRef< uint8_t > Data, llvm::endianness Endian) | |
BinaryByteStream (StringRef Data, llvm::endianness Endian) | |
llvm::endianness | getEndian () const override |
Error | readBytes (uint64_t Offset, uint64_t Size, ArrayRef< uint8_t > &Buffer) override |
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. | |
Error | readLongestContiguousChunk (uint64_t Offset, ArrayRef< uint8_t > &Buffer) override |
Given an offset into the stream, read as much as possible without copying any data. | |
uint64_t | getLength () override |
Return the number of bytes of data in this stream. | |
ArrayRef< uint8_t > | data () const |
StringRef | str () const |
Public Member Functions inherited from llvm::BinaryStream | |
virtual | ~BinaryStream ()=default |
virtual llvm::endianness | getEndian () const =0 |
virtual Error | readBytes (uint64_t Offset, uint64_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 ArrayRef to point to data owned by the stream. | |
virtual Error | readLongestContiguousChunk (uint64_t Offset, ArrayRef< uint8_t > &Buffer)=0 |
Given an offset into the stream, read as much as possible without copying any data. | |
virtual uint64_t | getLength ()=0 |
Return the number of bytes of data in this stream. | |
virtual BinaryStreamFlags | getFlags () const |
Return the properties of this stream. | |
Public Attributes | |
std::unique_ptr< MemoryBuffer > | MemBuffer |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::BinaryStream | |
Error | checkOffsetForRead (uint64_t Offset, uint64_t DataSize) |
Protected Attributes inherited from llvm::BinaryByteStream | |
llvm::endianness | Endian |
ArrayRef< uint8_t > | Data |
An implementation of BinaryStream whose data is backed by an llvm MemoryBuffer object.
MemoryBufferByteStream owns the MemoryBuffer in question. As with BinaryByteStream, reading from a MemoryBufferByteStream will never cause a copy.
Definition at line 74 of file BinaryByteStream.h.
|
inline |
Definition at line 76 of file BinaryByteStream.h.
std::unique_ptr<MemoryBuffer> llvm::MemoryBufferByteStream::MemBuffer |
Definition at line 81 of file BinaryByteStream.h.