llvm::WritableBinaryStreamRef::checkOffsetForRead

Validate that Offset and DataSize fall within this view for reading.

Synopsis

Declared in <llvm/Support/BinaryStreamRef.h>

Error
checkOffsetForRead(
    uint64_t Offset,
    uint64_t DataSize) const;

Return Value

Error::success() if the range is valid, otherwise an appropriate error.

Parameters

NameDescription
OffsetByte offset relative to this view at which to begin.
DataSizeNumber of bytes to be read.