19void BuiltinCASContext::anchor() {}
24 "invalid cas-id '" + Reference +
"'");
27 if (Reference.size() != 2 *
sizeof(
HashType))
29 "wrong size for cas-id hash '" + Reference +
"'");
32 if (!tryGetFromHex(Reference, Binary))
34 "invalid hash in cas-id '" + Reference +
"'");
52 toHex(Digest,
true, Hash);
62 return DefaultContext;
78 return Handle.takeError();
84 return Error::success();
90 if (!
ID.getHash().equals(Hash))
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
AMDGPU Mark last scratch load
static StringRef getCASIDPrefix()
Provides a library for accessing information about this process and other processes on the operating ...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Hasher for stored objects in builtin CAS.
static HashT hashObject(const ObjectStore &CAS, ArrayRef< ObjectRef > Refs, ArrayRef< char > Data)
Unique identifier for a CAS object.
static CASID create(const CASContext *Context, StringRef Hash)
Create CASID from CASContext and raw hash bytes.
static ObjectProxy load(ObjectStore &CAS, ObjectRef Ref, ObjectHandle Node)
Reference to an object in an ObjectStore instance.
const CASContext & getContext() const
Get CASContext.
virtual std::optional< ObjectRef > getReference(const CASID &ID) const =0
Get an existing reference to the object called ID.
CASContext for LLVM builtin CAS using BLAKE3 hash type.
static const BuiltinCASContext & getDefaultContext()
static Expected< HashType > parseID(StringRef PrintedDigest)
static void printID(ArrayRef< uint8_t > Digest, raw_ostream &OS)
Error createUnknownObjectError(const CASID &ID) const
Error validate(const CASID &ID) final
Validate the underlying object referred by CASID.
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.
virtual Expected< ObjectRef > storeImpl(ArrayRef< uint8_t > ComputedHash, ArrayRef< ObjectRef > Refs, ArrayRef< char > Data)=0
This class implements an extremely fast bulk output stream that can only output to a stream.
decltype(HasherT::hash(std::declval< ArrayRef< uint8_t > & >())) HashType
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
@ Ref
The access may reference the value stored in memory.
OutputIt copy(R &&Range, OutputIt Out)