10 #ifndef LLVM_SUPPORT_BINARYSTREAMREF_H
11 #define LLVM_SUPPORT_BINARYSTREAMREF_H
29 : SharedImpl(SharedImpl),
BorrowedImpl(SharedImpl.get()),
33 : BorrowedImpl(&BorrowedImpl),
ViewOffset(Offset), Length(Length) {}
54 RefType Result(static_cast<const RefType &>(*
this));
55 Result.ViewOffset +=
N;
66 RefType Result(static_cast<const RefType &>(*
this));
102 if (
Length != Other.Length)
175 return {Off +
Offset, SubSub};
182 std::pair<BinarySubstreamRef, BinarySubstreamRef>
193 WritableBinaryStream> {
229 #endif // LLVM_SUPPORT_BINARYSTREAMREF_H
BinarySubstreamRef keep_front(uint32_t N) const
RefType drop_back(uint32_t N) const
Return a new BinaryStreamRef with the first N elements removed.
Maximum length of the test input libFuzzer tries to guess a good value based on the corpus and reports it always prefer smaller inputs during the corpus shuffle When libFuzzer itself reports a bug this exit code will be used If indicates the maximal total time in seconds to run the fuzzer minimizes the provided crash input Use with tries to cleanse the provided crash input to make it contain fewer original bytes Use with exact_artifact_path to specify the output Experimental Use value profile to guide fuzzing Number of jobs to run If min(jobs, NumberOfCpuCores()/2)\" is used.") FUZZER_FLAG_INT(reload
StreamType * BorrowedImpl
RefType drop_front(uint32_t N) const
Return a new BinaryStreamRef with the first N elements removed.
std::shared_ptr< StreamType > SharedImpl
std::pair< BinarySubstreamRef, BinarySubstreamRef > split(uint32_t Offset) const
Common stuff for mutable and immutable StreamRefs.
BinaryStreamRefBase(StreamType &BorrowedImpl, uint32_t Offset, uint32_t Length)
WritableBinaryStreamRef()=default
bool operator==(const RefType &Other) const
RefType slice(uint32_t Offset, uint32_t Len) const
Return a new BinaryStreamRef with the first Offset elements removed, and retaining exactly Len elemen...
RefType drop_symmetric(uint32_t N) const
Return a new BinaryStreamRef with the first and last N elements removed.
BinarySubstreamRef drop_front(uint32_t N) const
An interface for accessing data in a stream-like format, but which discourages copying.
Error writeBytes(uint32_t Offset, ArrayRef< uint8_t > Data) const
Given an Offset into this WritableBinaryStreamRef and some input data, writes the data to the underly...
BinaryStreamRefBase(const BinaryStreamRefBase &Other)
BinaryStreamRef StreamData
Error commit()
For buffered streams, commits changes to the backing store.
static ErrorSuccess success()
Create a success value.
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
BinaryStreamRef()=default
RefType keep_back(uint32_t N) const
Return a new BinaryStreamRef with only the last N elements remaining.
uint32_t getLength() const
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
BinarySubstreamRef slice(uint32_t Off, uint32_t Size) const
BinaryStreamRefBase(std::shared_ptr< StreamType > SharedImpl, uint32_t Offset, uint32_t Length)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Error readLongestContiguousChunk(uint32_t Offset, ArrayRef< uint8_t > &Buffer) const
Given an Offset into this BinaryStreamRef, return a reference to the largest buffer the stream could ...
BinaryStreamRefBase()=default
Error readBytes(uint32_t Offset, uint32_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...
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
RefType keep_front(uint32_t N) const
Return a new BinaryStreamRef with only the first N elements remaining.
llvm::support::endianness getEndian() const
Error checkOffset(uint32_t Offset, uint32_t DataSize) const
A BinaryStream which can be read from as well as written to.