LLVM: llvm::FileCache Struct Reference (original) (raw)

This type represents a file cache system that manages caching of files.

It encapsulates a caching function and the directory path where the cache is stored. To request an item from the cache, pass a unique string as the Key. For hits, the cached file will be added to the link and this function will return AddStreamFn(). For misses, the cache will return a stream callback which must be called at most once to produce content for the stream. The file stream produced by the stream callback will add the file to the link after the stream is written to. ModuleName is the unique module identifier for the bitcode module the cache is being checked for.

Clients generally look like this:

if (AddStreamFn AddStream = Cache(Task, Key, ModuleName)) ProduceContent(AddStream);

CacheDirectoryPath stores the directory path where cached files are kept.

Definition at line 84 of file Caching.h.