19 std::shared_ptr<ondisk::UnifiedOnDiskCache> UniDB;
24 return std::make_pair(std::move(CAS), std::move(AC));
28 StringRef Path,
bool CheckHash,
bool AllowRecovery,
bool ForceValidation,
29 std::optional<StringRef> LLVMCasBinary) {
30#if LLVM_ENABLE_ONDISK_CAS
34 ForceValidation, LLVMCasBinary);
This file contains the declaration of the ActionCache class, which is the base class for ActionCache ...
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.
static StringRef getHashName()
Get the name of the hash for any table identifiers.
static Expected< ValidationResult > validateIfNeeded(StringRef Path, StringRef HashName, unsigned HashByteSize, bool CheckHash, OnDiskGraphDB::HashingFuncT HashFn, bool AllowRecovery, bool ForceValidation, std::optional< StringRef > LLVMCasBinary)
Validate the data in Path, if needed to ensure correctness.
std::unique_ptr< ObjectStore > createObjectStoreFromUnifiedOnDiskCache(std::shared_ptr< ondisk::UnifiedOnDiskCache > UniDB)
void hashingFunc(ArrayRef< ArrayRef< uint8_t > > Refs, ArrayRef< char > Data, SmallVectorImpl< uint8_t > &Result)
Convenience wrapper for BuiltinObjectHasher.
decltype(HasherT::hash(std::declval< ArrayRef< uint8_t > & >())) HashType
std::unique_ptr< ActionCache > createActionCacheFromUnifiedOnDiskCache(std::shared_ptr< ondisk::UnifiedOnDiskCache > UniDB)
Expected< std::unique_ptr< ondisk::UnifiedOnDiskCache > > createBuiltinUnifiedOnDiskCache(StringRef Path)
Create a UnifiedOnDiskCache instance that uses BLAKE3 hashing.
LLVM_ABI Expected< std::pair< std::unique_ptr< ObjectStore >, std::unique_ptr< ActionCache > > > createOnDiskUnifiedCASDatabases(StringRef Path)
Create on-disk ObjectStore and ActionCache instances based on ondisk::UnifiedOnDiskCache,...
LLVM_ABI Expected< ValidationResult > validateOnDiskUnifiedCASDatabasesIfNeeded(StringRef Path, bool CheckHash, bool AllowRecovery, bool ForceValidation, std::optional< StringRef > LLVMCasBinaryPath)
Validate the data in Path, if needed to ensure correctness.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.