LLVM 22.0.0git
|
Common stuff for mutable and immutable StreamRefs. More...
#include "llvm/Support/BinaryStreamRef.h"
Public Member Functions | |
llvm::endianness | getEndian () const |
uint64_t | getLength () const |
RefType | drop_front (uint64_t N) const |
Return a new BinaryStreamRef with the first N elements removed. | |
RefType | drop_back (uint64_t N) const |
Return a new BinaryStreamRef with the last N elements removed. | |
RefType | keep_front (uint64_t N) const |
Return a new BinaryStreamRef with only the first N elements remaining. | |
RefType | keep_back (uint64_t N) const |
Return a new BinaryStreamRef with only the last N elements remaining. | |
RefType | drop_symmetric (uint64_t N) const |
Return a new BinaryStreamRef with the first and last N elements removed. | |
RefType | slice (uint64_t Offset, uint64_t Len) const |
Return a new BinaryStreamRef with the first Offset elements removed, and retaining exactly Len elements. | |
bool | valid () const |
Protected Member Functions | |
BinaryStreamRefBase ()=default | |
BinaryStreamRefBase (StreamType &BorrowedImpl) | |
BinaryStreamRefBase (std::shared_ptr< StreamType > SharedImpl, uint64_t Offset, std::optional< uint64_t > Length) | |
BinaryStreamRefBase (StreamType &BorrowedImpl, uint64_t Offset, std::optional< uint64_t > Length) | |
BinaryStreamRefBase (const BinaryStreamRefBase &Other)=default | |
BinaryStreamRefBase & | operator= (const BinaryStreamRefBase &Other)=default |
BinaryStreamRefBase & | operator= (BinaryStreamRefBase &&Other)=default |
BinaryStreamRefBase (BinaryStreamRefBase &&Other)=default | |
Error | checkOffsetForRead (uint64_t Offset, uint64_t DataSize) const |
Protected Attributes | |
std::shared_ptr< StreamType > | SharedImpl |
StreamType * | BorrowedImpl = nullptr |
uint64_t | ViewOffset = 0 |
std::optional< uint64_t > | Length |
Friends | |
bool | operator== (const RefType &LHS, const RefType &RHS) |
Common stuff for mutable and immutable StreamRefs.
Definition at line 24 of file BinaryStreamRef.h.
|
protecteddefault |
Referenced by BinaryStreamRefBase(), BinaryStreamRefBase(), operator=(), and operator=().
|
inlineexplicitprotected |
Definition at line 27 of file BinaryStreamRef.h.
References BorrowedImpl, llvm::BSF_Append, Length, and ViewOffset.
|
inlineprotected |
Definition at line 33 of file BinaryStreamRef.h.
References BorrowedImpl, llvm::get(), Length, llvm::Offset, SharedImpl, and ViewOffset.
|
inlineprotected |
Definition at line 37 of file BinaryStreamRef.h.
References BorrowedImpl, Length, llvm::Offset, and ViewOffset.
|
protecteddefault |
References BinaryStreamRefBase(), and llvm::Other.
|
protecteddefault |
References BinaryStreamRefBase(), and llvm::Other.
|
inlineprotected |
Definition at line 133 of file BinaryStreamRef.h.
References llvm::DataSize, getLength(), llvm::invalid_offset, llvm::make_error(), llvm::Offset, llvm::stream_too_short, and llvm::Error::success().
|
inline |
Return a new BinaryStreamRef with the last N
elements removed.
If this BinaryStreamRef is length-tracking and N
is greater than 0, then this BinaryStreamRef will no longer length-track.
Definition at line 77 of file BinaryStreamRef.h.
References BorrowedImpl, getLength(), and N.
Referenced by keep_front().
|
inline |
Return a new BinaryStreamRef with the first N
elements removed.
If this BinaryStreamRef is length-tracking, then the resulting one will be too.
Definition at line 59 of file BinaryStreamRef.h.
References BorrowedImpl, getLength(), and N.
Referenced by drop_symmetric(), llvm::pdb::LinePrinter::formatMsfStreamData(), keep_back(), and slice().
|
inline |
Return a new BinaryStreamRef with the first and last N
elements removed.
Definition at line 110 of file BinaryStreamRef.h.
References drop_front(), and N.
|
inline |
Definition at line 47 of file BinaryStreamRef.h.
References BorrowedImpl.
|
inline |
Definition at line 49 of file BinaryStreamRef.h.
References BorrowedImpl, Length, and ViewOffset.
Referenced by checkOffsetForRead(), drop_back(), drop_front(), keep_back(), and keep_front().
|
inline |
Return a new BinaryStreamRef with only the last N
elements remaining.
Definition at line 103 of file BinaryStreamRef.h.
References assert(), drop_front(), getLength(), and N.
|
inline |
Return a new BinaryStreamRef with only the first N
elements remaining.
Definition at line 97 of file BinaryStreamRef.h.
References assert(), drop_back(), getLength(), and N.
Referenced by llvm::pdb::LinePrinter::formatMsfStreamData().
|
protecteddefault |
References BinaryStreamRefBase(), and llvm::Other.
|
protecteddefault |
References BinaryStreamRefBase(), and llvm::Other.
|
inline |
Return a new BinaryStreamRef with the first Offset
elements removed, and retaining exactly Len
elements.
Definition at line 116 of file BinaryStreamRef.h.
References drop_front(), and llvm::Offset.
Referenced by llvm::VarStreamArray< CVSymbol >::substream().
|
inline |
Definition at line 120 of file BinaryStreamRef.h.
References BorrowedImpl.
|
friend |
Definition at line 122 of file BinaryStreamRef.h.
|
protected |
Definition at line 142 of file BinaryStreamRef.h.
Referenced by BinaryStreamRefBase(), BinaryStreamRefBase(), BinaryStreamRefBase(), drop_back(), drop_front(), getEndian(), getLength(), and valid().
|
protected |
Definition at line 144 of file BinaryStreamRef.h.
Referenced by BinaryStreamRefBase(), BinaryStreamRefBase(), BinaryStreamRefBase(), and getLength().
|
protected |
Definition at line 141 of file BinaryStreamRef.h.
Referenced by BinaryStreamRefBase().
|
protected |
Definition at line 143 of file BinaryStreamRef.h.
Referenced by BinaryStreamRefBase(), BinaryStreamRefBase(), BinaryStreamRefBase(), and getLength().