|
clang 24.0.0git
|
The module cache used for compiling modules implicitly. More...
#include "clang/Serialization/ModuleCache.h"
Public Member Functions | |
| ModuleCache (AtomicLineLogger &Logger) | |
| virtual const ModuleCacheDirectory * | getDirectoryPtr (StringRef Path) |
| Returns an opaque pointer representing the module cache directory. | |
| virtual std::unique_ptr< llvm::AdvisoryLock > | getLock (StringRef ModuleFilename)=0 |
| Returns lock for the given module file. The lock is initially unlocked. | |
| virtual std::time_t | getModuleTimestamp (StringRef ModuleFilename)=0 |
| Returns the timestamp denoting the last time inputs of the module file were validated. | |
| virtual void | updateModuleTimestamp (StringRef ModuleFilename)=0 |
| Updates the timestamp denoting the last time inputs of the module file were validated. | |
| virtual void | maybePrune (StringRef Path, time_t PruneInterval, time_t PruneAfter)=0 |
| Prune module files that haven't been accessed in a long time. | |
| virtual InMemoryModuleCache & | getInMemoryModuleCache ()=0 |
| Returns this process's view of the module cache. | |
| virtual const InMemoryModuleCache & | getInMemoryModuleCache () const =0 |
| virtual std::error_code | write (StringRef Path, llvm::MemoryBufferRef Buffer, off_t &Size, time_t &ModTime)=0 |
| Write the PCM contents to the given path in the module cache. | |
| virtual Expected< std::unique_ptr< llvm::MemoryBuffer > > | read (StringRef FileName, off_t &Size, time_t &ModTime)=0 |
| virtual | ~ModuleCache ()=default |
| AtomicLineLogger & | getLogger () |
Protected Attributes | |
| AtomicLineLogger & | Logger |
| A logger to record timestamp read/write and file read/write. | |
The module cache used for compiling modules implicitly.
This centralizes the operations the compiler might want to perform on the cache.
Definition at line 39 of file ModuleCache.h.
|
inlineexplicit |
Definition at line 52 of file ModuleCache.h.
References Logger.
|
virtualdefault |
|
virtual |
Returns an opaque pointer representing the module cache directory.
This returns the same pointer regardless of the path spelling, as long as it resolves to the same file system entity. This also resolves links in the path. This may return nullptr if the module cache does not exist.
Definition at line 23 of file ModuleCache.cpp.
|
pure virtual |
|
pure virtual |
Returns this process's view of the module cache.
Referenced by clang::serialization::ModuleManager::addModule(), compileModuleImpl(), createASTReader(), and clang::ASTReader::readASTFileControlBlock().
|
pure virtual |
Returns lock for the given module file. The lock is initially unlocked.
Referenced by compileModuleBehindLockOrRead(), and AsyncModuleCompile::moduleLoadSkipped().
|
inline |
Definition at line 93 of file ModuleCache.h.
References Logger.
Referenced by clang::CompilerInstance::compileModule().
|
pure virtual |
Returns the timestamp denoting the last time inputs of the module file were validated.
Referenced by AsyncModuleCompile::moduleLoadSkipped().
|
pure virtual |
Prune module files that haven't been accessed in a long time.
|
pure virtual |
References clang::FileName.
|
pure virtual |
Updates the timestamp denoting the last time inputs of the module file were validated.
Referenced by compileModuleImpl().
|
pure virtual |
Write the PCM contents to the given path in the module cache.
Referenced by compileModuleImpl().
|
protected |
A logger to record timestamp read/write and file read/write.
Definition at line 49 of file ModuleCache.h.
Referenced by getLogger(), and ModuleCache().