Go to the documentation of this file.
9 #ifndef LLVM_SUPPORT_BINARYSTREAMREF_H
10 #define LLVM_SUPPORT_BINARYSTREAMREF_H
65 RefType Result(
static_cast<const RefType &
>(*
this));
69 Result.ViewOffset +=
N;
82 RefType Result(
static_cast<const RefType &
>(*
this));
124 if (
LHS.BorrowedImpl !=
RHS.BorrowedImpl)
126 if (
LHS.ViewOffset !=
RHS.ViewOffset)
128 if (
LHS.Length !=
RHS.Length)
205 return {Off +
Offset, SubSub};
212 std::pair<BinarySubstreamRef, BinarySubstreamRef>
split(
uint64_t Off)
const {
222 WritableBinaryStream> {
272 #endif // LLVM_SUPPORT_BINARYSTREAMREF_H
Error readLongestContiguousChunk(uint64_t Offset, ArrayRef< uint8_t > &Buffer) const
Given an Offset into this BinaryStreamRef, return a reference to the largest buffer the stream could ...
An interface for accessing data in a stream-like format, but which discourages copying.
This is an optimization pass for GlobalISel generic memory operations.
WritableBinaryStreamRef & operator=(const WritableBinaryStreamRef &Other)=default
BinaryStreamRef()=default
static ErrorSuccess success()
Create a success value.
BinaryStreamRefBase & operator=(const BinaryStreamRefBase &Other)=default
Error checkOffsetForRead(uint64_t Offset, uint64_t DataSize) const
BinarySubstreamRef drop_front(uint64_t N) const
Optional< uint64_t > Length
Error commit()
For buffered streams, commits changes to the backing store.
RefType drop_symmetric(uint64_t N) const
Return a new BinaryStreamRef with the first and last N elements removed.
RefType drop_back(uint64_t N) const
Return a new BinaryStreamRef with the last N elements removed.
std::shared_ptr< StreamType > SharedImpl
uint64_t getLength() const
BinaryStreamRef StreamData
RefType keep_front(uint64_t N) const
Return a new BinaryStreamRef with only the first N elements remaining.
StreamType
The type of a minidump stream identifies its contents.
WritableBinaryStreamRef()=default
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
BinaryStreamRefBase()=default
Expected< ExpressionValue > min(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
Common stuff for mutable and immutable StreamRefs.
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
llvm::support::endianness getEndian() const
friend bool operator==(const RefType &LHS, const RefType &RHS)
BinarySubstreamRef slice(uint64_t Off, uint64_t Size) const
std::pair< BinarySubstreamRef, BinarySubstreamRef > split(uint64_t Off) const
BinarySubstreamRef keep_front(uint64_t N) const
RefType slice(uint64_t Offset, uint64_t Len) const
Return a new BinaryStreamRef with the first Offset elements removed, and retaining exactly Len elemen...
Should compile to something r4 addze r3 instead we get
Lightweight error class with error context and mandatory checking.
BinaryStreamRefBase(StreamType &BorrowedImpl)
StreamType * BorrowedImpl
RefType keep_back(uint64_t N) const
Return a new BinaryStreamRef with only the last N elements remaining.
Error writeBytes(uint64_t Offset, ArrayRef< uint8_t > Data) const
Given an Offset into this WritableBinaryStreamRef and some input data, writes the data to the underly...
Error readBytes(uint64_t Offset, uint64_t Size, ArrayRef< uint8_t > &Buffer) const
Given an Offset into this StreamRef and a Size, return a reference to a buffer owned by the stream.
BinaryStreamRef & operator=(const BinaryStreamRef &Other)=default
BinaryStreamRefBase(std::shared_ptr< StreamType > SharedImpl, uint64_t Offset, Optional< uint64_t > Length)
BinaryStreamRefBase(StreamType &BorrowedImpl, uint64_t Offset, Optional< uint64_t > Length)
A BinaryStream which can be read from as well as written to.
RefType drop_front(uint64_t N) const
Return a new BinaryStreamRef with the first N elements removed.
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
BinaryStreamFlags getFlags() const override
Return the properties of this stream.
Optional< std::vector< StOtherPiece > > Other