|
LLVM 24.0.0git
|
Namespaces | |
| namespace | builtin |
| namespace | ondisk |
Classes | |
| class | ActionCache |
| A cache from a key (that describes an action) to the result of performing that action. More... | |
| class | BuiltinObjectHasher |
| Hasher for stored objects in builtin CAS. More... | |
| class | CacheKey |
| A key for caching an operation. More... | |
| class | CASContext |
| Context for CAS identifiers. More... | |
| class | CASID |
| Unique identifier for a CAS object. More... | |
| class | FileOffset |
| FileOffset is a wrapper around uint64_t to represent the offset of data from the beginning of the file. More... | |
| class | MappedFileRegionArena |
| Allocator for an owned mapped file region that supports thread-safe and process-safe bump pointer allocation. More... | |
| struct | NamedValuesEntry |
| Represents an entry in NamedValuesSchema. More... | |
| class | NamedValuesProxy |
| A proxy for a loaded CAS Object in NamedValuesSchema. More... | |
| class | NamedValuesSchema |
| A schema for representing an array of named nodes in a CAS. More... | |
| class | NodeSchema |
| A base class for schemas built on top of CAS nodes. More... | |
| class | ObjectHandle |
| Handle to a loaded object in a ObjectStore instance. More... | |
| class | ObjectProxy |
| Reference to an abstract hierarchical node, with data and references. More... | |
| class | ObjectRef |
| Reference to an object in an ObjectStore instance. More... | |
| class | ObjectStore |
| Content-addressable storage for objects. More... | |
| class | OnDiskDataAllocator |
| Sink for data. More... | |
| class | OnDiskTrieRawHashMap |
| OnDiskTrieRawHashMap is a persistent trie data structure used as hash maps. More... | |
| class | ReferenceBase |
| Base class for references to things in ObjectStore. More... | |
Enumerations | |
| enum class | ValidationResult { Valid , Recovered , Skipped } |
| Represents the result of validating the contents, e.g. More... | |
Functions | |
| LLVM_ABI std::unique_ptr< ActionCache > | createInMemoryActionCache () |
| Create an action cache in memory. | |
| LLVM_ABI Expected< std::unique_ptr< ActionCache > > | createOnDiskActionCache (StringRef Path) |
| Create an action cache on disk. | |
| 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, with built-in hashing. | |
| LLVM_ABI Expected< ValidationResult > | validateOnDiskUnifiedCASDatabasesIfNeeded (StringRef Path, bool CheckHash, bool ForceValidation) |
Validate the builtin on-disk CAS in Path in-process, if needed. | |
| LLVM_ABI Expected< ValidationResult > | recoverOnDiskUnifiedCASDatabases (StringRef Path) |
Recover the builtin on-disk CAS in Path after a failed validation. | |
| LLVM_ABI std::unique_ptr< ObjectStore > | createInMemoryCAS () |
| Create an in memory CAS. | |
| LLVM_ABI bool | isOnDiskCASEnabled () |
| LLVM_ABI Expected< std::unique_ptr< ObjectStore > > | createOnDiskCAS (const Twine &Path) |
Create a persistent on-disk path at Path. | |
| LLVM_ABI Expected< std::pair< std::shared_ptr< ObjectStore >, std::shared_ptr< ActionCache > > > | createPluginCASDatabases (StringRef PluginPath, StringRef OnDiskPath, ArrayRef< std::pair< std::string, std::string > > PluginArgs) |
Create ObjectStore and ActionCache instances backed by a plugin that implements the C API in "llvm-c/CAS/PluginAPI_functions.h". | |
| LLVM_ABI Expected< ValidationResult > | validatePluginCASDatabasesIfNeeded (StringRef PluginPath, StringRef OnDiskPath, ArrayRef< std::pair< std::string, std::string > > PluginArgs, bool CheckHash, bool ForceValidation) |
Validate the on-disk data of a plugin-backed CAS in-process if needed, by calling the plugin's llcas_cas_validate_if_needed. | |
| LLVM_ABI Expected< ValidationResult > | recoverPluginCASDatabases (StringRef PluginPath, StringRef OnDiskPath, ArrayRef< std::pair< std::string, std::string > > PluginArgs) |
Recover the on-disk data of a plugin-backed CAS after a failed validatePluginCASDatabasesIfNeeded, by calling the plugin's llcas_cas_recover_ondisk_data. | |
Variables | |
| template class LLVM_TEMPLATE_ABI | BuiltinObjectHasher< BLAKE3 > |
|
strong |
Represents the result of validating the contents, e.g.
using validateOnDiskUnifiedCASDatabasesIfNeeded, or of recovering from a failed validation, e.g. using recoverOnDiskUnifiedCASDatabases.
Note: invalid results are handled as an Error.
| Enumerator | |
|---|---|
| Valid | The data is already valid. |
| Recovered | The data was invalid, but was recovered. |
| Skipped | Validation or recovery was skipped, as it was not needed. |
Definition at line 19 of file ValidationResult.h.
| std::unique_ptr< ActionCache > llvm::cas::createInMemoryActionCache | ( | ) |
Create an action cache in memory.
Definition at line 144 of file ActionCaches.cpp.
| std::unique_ptr< ObjectStore > llvm::cas::createInMemoryCAS | ( | ) |
Create an in memory CAS.
Definition at line 335 of file InMemoryCAS.cpp.
| Expected< std::unique_ptr< ActionCache > > llvm::cas::createOnDiskActionCache | ( | StringRef | Path | ) |
Create an action cache on disk.
Definition at line 245 of file ActionCaches.cpp.
References llvm::createStringError(), and llvm::inconvertibleErrorCode().
| Expected< std::unique_ptr< ObjectStore > > llvm::cas::createOnDiskCAS | ( | const Twine & | Path | ) |
Create a persistent on-disk path at Path.
Definition at line 264 of file OnDiskCAS.cpp.
References llvm::createStringError(), llvm::inconvertibleErrorCode(), and llvm::sys::fs::make_absolute().
| Expected< std::pair< std::unique_ptr< ObjectStore >, std::unique_ptr< ActionCache > > > llvm::cas::createOnDiskUnifiedCASDatabases | ( | StringRef | Path | ) |
Create on-disk ObjectStore and ActionCache instances based on ondisk::UnifiedOnDiskCache, with built-in hashing.
Definition at line 18 of file BuiltinUnifiedCASDatabases.cpp.
References llvm::cas::builtin::createActionCacheFromUnifiedOnDiskCache(), llvm::cas::builtin::createBuiltinUnifiedOnDiskCache(), and llvm::cas::builtin::createObjectStoreFromUnifiedOnDiskCache().
| Expected< std::pair< std::shared_ptr< ObjectStore >, std::shared_ptr< ActionCache > > > llvm::cas::createPluginCASDatabases | ( | StringRef | PluginPath, |
| StringRef | OnDiskPath, | ||
| ArrayRef< std::pair< std::string, std::string > > | PluginArgs ) |
Create ObjectStore and ActionCache instances backed by a plugin that implements the C API in "llvm-c/CAS/PluginAPI_functions.h".
| PluginPath | path of the dynamic library to load. |
| OnDiskPath | local path that the plugin should use for any on-disk resources/caches. |
| PluginArgs | name/value pairs passed to the plugin as custom options; they are opaque to the client. |
Definition at line 578 of file PluginCAS.cpp.
| bool llvm::cas::isOnDiskCASEnabled | ( | ) |
LLVM_ENABLE_ONDISK_CAS configuration was enabled. Definition at line 256 of file OnDiskCAS.cpp.
| Expected< ValidationResult > llvm::cas::recoverOnDiskUnifiedCASDatabases | ( | StringRef | Path | ) |
Recover the builtin on-disk CAS in Path after a failed validation.
See ondisk::UnifiedOnDiskCache::recover.
Definition at line 41 of file BuiltinUnifiedCASDatabases.cpp.
References llvm::createStringError(), llvm::inconvertibleErrorCode(), and llvm::cas::ondisk::UnifiedOnDiskCache::recover().
| Expected< ValidationResult > llvm::cas::recoverPluginCASDatabases | ( | StringRef | PluginPath, |
| StringRef | OnDiskPath, | ||
| ArrayRef< std::pair< std::string, std::string > > | PluginArgs ) |
Recover the on-disk data of a plugin-backed CAS after a failed validatePluginCASDatabasesIfNeeded, by calling the plugin's llcas_cas_recover_ondisk_data.
Recovered if the data has been recovered, Skipped if recovery is not needed (e.g. a concurrent process already recovered), or an Error if recovery cannot be performed (including if the plugin does not support it). Definition at line 652 of file PluginCAS.cpp.
References callPluginValidationFunction(), and llvm::createStringError().
| Expected< ValidationResult > llvm::cas::validateOnDiskUnifiedCASDatabasesIfNeeded | ( | StringRef | Path, |
| bool | CheckHash, | ||
| bool | ForceValidation ) |
Validate the builtin on-disk CAS in Path in-process, if needed.
See ondisk::UnifiedOnDiskCache::validateIfNeeded.
Definition at line 28 of file BuiltinUnifiedCASDatabases.cpp.
References llvm::createStringError(), llvm::cas::builtin::BuiltinCASContext::getHashName(), llvm::cas::builtin::hashingFunc(), llvm::inconvertibleErrorCode(), and llvm::cas::ondisk::UnifiedOnDiskCache::validateIfNeeded().
| Expected< ValidationResult > llvm::cas::validatePluginCASDatabasesIfNeeded | ( | StringRef | PluginPath, |
| StringRef | OnDiskPath, | ||
| ArrayRef< std::pair< std::string, std::string > > | PluginArgs, | ||
| bool | CheckHash, | ||
| bool | ForceValidation ) |
Validate the on-disk data of a plugin-backed CAS in-process if needed, by calling the plugin's llcas_cas_validate_if_needed.
The plugin decides whether validation is needed.
Clients that want to be resilient to unexpected crashes during validation may call this from a separate process (e.g. via llvm-cas -validate-if-needed) and call recoverPluginCASDatabases if it fails.
| PluginPath | path of the dynamic library to load. |
| OnDiskPath | local path that the plugin uses for any on-disk resources/caches. |
| PluginArgs | name/value pairs passed to the plugin as custom options; they are opaque to the client. |
| CheckHash | Whether to validate hashes match the data. |
| ForceValidation | Whether to force validation to occur even if it should not be necessary. |
Valid if the data is valid, Skipped if validation is not needed, or an Error if validation cannot be performed (including if the plugin does not support it) or the data is invalid. Definition at line 636 of file PluginCAS.cpp.
References callPluginValidationFunction(), and llvm::createStringError().
| template class LLVM_EXPORT_TEMPLATE llvm::cas::BuiltinObjectHasher< BLAKE3 > |
Definition at line 50 of file BuiltinObjectHasher.cpp.