llvm::BinaryStream::checkOffsetForRead

Check that Offset and DataSize form a valid read range.

Synopsis

Declared in <llvm/Support/BinaryStream.h>

Error
checkOffsetForRead(
    uint64_t Offset,
    uint64_t DataSize);

Return Value

a success error code if the read range is valid, otherwise an appropriate error code.

Parameters

NameDescription
OffsetByte offset into the stream at which the read would begin.
DataSizeNumber of bytes that would be read.