|
LLVM 24.0.0git
|
Implements ObjectStore and ActionCache on top of a dynamically loaded plugin that provides the C API in "llvm-c/CAS/PluginAPI_functions.h".
More...
#include "PluginAPI.h"#include "llvm/ADT/STLFunctionalExtras.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/CAS/ActionCache.h"#include "llvm/CAS/ObjectStore.h"#include "llvm/Support/DynamicLibrary.h"#include "llvm/Support/Error.h"#include "llvm/Support/MemoryBuffer.h"#include "PluginAPI_functions.def"Go to the source code of this file.
Macros | |
| #define | CASPLUGINAPI_FUNCTION(name, required) |
Functions | |
| static Expected< llcas_cas_options_t > | createPluginOptions (const llcas_functions_t &Functions, StringRef OnDiskPath, ArrayRef< std::pair< std::string, std::string > > PluginArgs) |
Creates a llcas_cas_options_t for OnDiskPath and PluginArgs. | |
| static StringRef | toStringRef (llcas_digest_t c_digest) |
| static Expected< ValidationResult > | callPluginValidationFunction (StringRef PluginPath, StringRef OnDiskPath, ArrayRef< std::pair< std::string, std::string > > PluginArgs, function_ref< Expected< llcas_validation_result_t >(const llcas_functions_t &, llcas_cas_options_t, char **)> Fn) |
Loads the plugin and calls Fn with a llcas_cas_options_t for OnDiskPath and PluginArgs, converting the returned llcas_validation_result_t. | |
Implements ObjectStore and ActionCache on top of a dynamically loaded plugin that provides the C API in "llvm-c/CAS/PluginAPI_functions.h".
The asynchronous entry points of the plugin API are not called yet; they will be wired up once ObjectStore and ActionCache grow asynchronous interfaces.
Definition in file PluginCAS.cpp.
| #define CASPLUGINAPI_FUNCTION | ( | name, | |
| required ) |
|
static |
Loads the plugin and calls Fn with a llcas_cas_options_t for OnDiskPath and PluginArgs, converting the returned llcas_validation_result_t.
Definition at line 593 of file PluginCAS.cpp.
References createPluginOptions(), llvm::createStringError(), E(), LLCAS_VALIDATION_RESULT_ERROR, LLCAS_VALIDATION_RESULT_RECOVERED, LLCAS_VALIDATION_RESULT_SKIPPED, LLCAS_VALIDATION_RESULT_VALID, Msg, llvm::cas::Recovered, llvm::cas::Skipped, and llvm::cas::Valid.
Referenced by llvm::cas::recoverPluginCASDatabases(), and llvm::cas::validatePluginCASDatabasesIfNeeded().
|
static |
Creates a llcas_cas_options_t for OnDiskPath and PluginArgs.
On success the caller is responsible for disposing it.
Definition at line 105 of file PluginCAS.cpp.
References llvm::SmallString< InternalLen >::c_str(), LLCAS_VERSION_MAJOR, and LLCAS_VERSION_MINOR.
Referenced by callPluginValidationFunction().
|
static |
Definition at line 280 of file PluginCAS.cpp.
References llcas_digest_t::data, and llcas_digest_t::size.
Referenced by llvm::cas::ObjectStore::getDataString(), and llvm::cas::ObjectStore::readData().