chigraph
master
Systems programming language written for beginners in LLVM
DefaultModuleCache.hpp
1
3
#ifndef CHI_DEFAULT_MODULE_CACHE_HPP
4
#define CHI_DEFAULT_MODULE_CACHE_HPP
5
6
#include "
chi/ModuleCache.hpp
"
7
8
namespace
chi
{
9
10
struct
DefaultModuleCache
:
public
ModuleCache
{
13
DefaultModuleCache
(
Context
& ctx);
14
18
boost::filesystem::path
cachePathForModule
(
const
boost::filesystem::path& moduleName)
const
;
19
21
Result
cacheModule
(
const
boost::filesystem::path& moduleName, llvm::Module& compiledModule,
22
std::time_t timeAtFileRead)
override
;
23
25
void
invalidateCache
(
const
boost::filesystem::path& moduleName)
override
;
26
28
std::time_t
cacheUpdateTime
(
const
boost::filesystem::path& moduleName)
const override
;
29
31
std::unique_ptr<llvm::Module>
retrieveFromCache
(
const
boost::filesystem::path& moduleName,
32
std::time_t atLeastThisNew)
override
;
33
};
34
}
35
36
#endif // CHI_DEFAULT_MODULE_CACHE_HPP
chi::DefaultModuleCache::invalidateCache
void invalidateCache(const boost::filesystem::path &moduleName) override
Definition:
DefaultModuleCache.cpp:75
ModuleCache.hpp
chi::DefaultModuleCache::retrieveFromCache
std::unique_ptr< llvm::Module > retrieveFromCache(const boost::filesystem::path &moduleName, std::time_t atLeastThisNew) override
Retrieve a module from the cache.
Definition:
DefaultModuleCache.cpp:87
chi::Context
The class that handles the loading, creation, storing, and compilation of modules It also stores a LL...
Definition:
Context.hpp:55
chi::DefaultModuleCache::cachePathForModule
boost::filesystem::path cachePathForModule(const boost::filesystem::path &moduleName) const
Get the cache name for a module.
Definition:
DefaultModuleCache.cpp:70
chi::DefaultModuleCache::cacheUpdateTime
std::time_t cacheUpdateTime(const boost::filesystem::path &moduleName) const override
Get the time that a cache was updated.
Definition:
DefaultModuleCache.cpp:83
chi::ModuleCache
This class provides an interface for creating module caches.
Definition:
ModuleCache.hpp:16
chi::DefaultModuleCache::cacheModule
Result cacheModule(const boost::filesystem::path &moduleName, llvm::Module &compiledModule, std::time_t timeAtFileRead) override
Cache a module.
Definition:
DefaultModuleCache.cpp:28
chi
The namespace where chigraph lives.
Definition:
BitcodeParser.hpp:12
chi::Result
The result object, used for identifiying errors with good diagnostics.
Definition:
Result.hpp:72
chi::DefaultModuleCache::DefaultModuleCache
DefaultModuleCache(Context &ctx)
Default constrcutor.
Definition:
DefaultModuleCache.cpp:26
chi::DefaultModuleCache
Definition:
DefaultModuleCache.hpp:10
lib
core
include
chi
DefaultModuleCache.hpp
Generated on Sat Sep 16 2017 17:41:35 for chigraph by
1.8.13