5 #ifndef CHI_MODULE_CACHE_HPP 6 #define CHI_MODULE_CACHE_HPP 10 #include <boost/filesystem/path.hpp> 37 llvm::Module& compiledModule, std::time_t timeAtFileRead) = 0;
42 virtual void invalidateCache(
const boost::filesystem::path& moduleName) = 0;
47 virtual std::time_t
cacheUpdateTime(
const boost::filesystem::path& moduleName)
const = 0;
55 const boost::filesystem::path& moduleName, std::time_t atLeastThisNew) = 0;
67 #endif // CHI_MODULE_CACHE_HPP ModuleCache(Context &ctx)
Create a module cache with a bound context.
Forward declares all the chigraph data types.
virtual Result cacheModule(const boost::filesystem::path &moduleName, llvm::Module &compiledModule, std::time_t timeAtFileRead)=0
Cache a module.
The class that handles the loading, creation, storing, and compilation of modules It also stores a LL...
virtual std::unique_ptr< llvm::Module > retrieveFromCache(const boost::filesystem::path &moduleName, std::time_t atLeastThisNew)=0
Retrieve a module from the cache.
virtual std::time_t cacheUpdateTime(const boost::filesystem::path &moduleName) const =0
Get the time that a cache was updated.
virtual ~ModuleCache()=default
Destructor.
This class provides an interface for creating module caches.
Context & context() const
Get the context this cache is bound to.
The namespace where chigraph lives.
The result object, used for identifiying errors with good diagnostics.
virtual void invalidateCache(const boost::filesystem::path &moduleName)=0
Inavlidate the cache, ie.