LLVM 20.0.0git
Classes | Namespaces | Typedefs | Functions
Caching.h File Reference
#include "llvm/Support/Error.h"

Go to the source code of this file.

Classes

class  llvm::CachedFileStream
 This class wraps an output stream for a file. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Typedefs

using llvm::AddStreamFn = std::function< Expected< std::unique_ptr< CachedFileStream > >(unsigned Task, const Twine &ModuleName)>
 This type defines the callback to add a file that is generated on the fly.
 
using llvm::FileCache = std::function< Expected< AddStreamFn >(unsigned Task, StringRef Key, const Twine &ModuleName)>
 This is the type of a file cache.
 
using llvm::AddBufferFn = std::function< void(unsigned Task, const Twine &ModuleName, std::unique_ptr< MemoryBuffer > MB)>
 This type defines the callback to add a pre-existing file (e.g.
 

Functions

Expected< FileCachellvm::localCache (const Twine &CacheNameRef, const Twine &TempFilePrefixRef, const Twine &CacheDirectoryPathRef, AddBufferFn AddBuffer=[](size_t Task, const Twine &ModuleName, std::unique_ptr< MemoryBuffer > MB) {})
 Create a local file system cache which uses the given cache name, temporary file prefix, cache directory and file callback.