9#ifndef LLVM_LIB_CAS_BUILTINCAS_H
10#define LLVM_LIB_CAS_BUILTINCAS_H
45 bool RequiresNullTerminator)
const final {
55 "unknown object '" +
ID.toString() +
"'");
60 "corrupt object '" +
ID.toString() +
"'");
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
A cache from a key (that describes an action) to the result of performing that action.
Unique identifier for a CAS object.
Handle to a loaded object in a ObjectStore instance.
ObjectStore(const CASContext &Context)
CASContext for LLVM builtin CAS using BLAKE3 hash type.
virtual Expected< ObjectRef > storeFromNullTerminatedRegion(ArrayRef< uint8_t > ComputedHash, sys::fs::mapped_file_region Map)
Error createUnknownObjectError(const CASID &ID) const
Error createCorruptStorageError() const
virtual ArrayRef< char > getDataConst(ObjectHandle Node) const =0
Both builtin CAS implementations provide lifetime for free, so this can be const, and readData() and ...
Error validate(const CASID &ID) final
Validate the underlying object referred by CASID.
uint64_t getDataSize(ObjectHandle Node) const final
Get the size of some data.
Expected< CASID > parseID(StringRef Reference) final
Get a CASID from a ID, which should have been generated by CASID::print().
Error createCorruptObjectError(const CASID &ID) const
Expected< ObjectRef > store(ArrayRef< ObjectRef > Refs, ArrayRef< char > Data) final
Store object into ObjectStore.
ArrayRef< char > getData(ObjectHandle Node, bool RequiresNullTerminator) const final
virtual Expected< ObjectRef > storeImpl(ArrayRef< uint8_t > ComputedHash, ArrayRef< ObjectRef > Refs, ArrayRef< char > Data)=0
This class represents a memory mapped file.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
ArrayRef(const T &OneElt) -> ArrayRef< T >