ΒΆExpected<llvm::FileCache> localCache(
    llvm::Twine CacheNameRef,
    llvm::Twine TempFilePrefixRef,
    llvm::Twine CacheDirectoryPathRef,
    llvm::AddBufferFn AddBuffer =
        [](unsigned long Task,
           std::unique_ptr<
               llvm::MemoryBuffer,
               std::default_delete<
                   llvm::MemoryBuffer>> MB) {})

Description

Create a local file system cache which uses the given cache name, temporary file prefix, cache directory and file callback. This function does not immediately create the cache directory if it does not yet exist; this is done lazily the first time a file is added. The cache name appears in error messages for errors during caching. The temporary file prefix is used in the temporary file naming scheme used when writing files atomically.

Declared at: llvm/include/llvm/Support/Caching.h:70

Parameters

llvm::Twine CacheNameRef
llvm::Twine TempFilePrefixRef
llvm::Twine CacheDirectoryPathRef
llvm::AddBufferFn AddBuffer = [](unsigned long Task, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>> MB) { }