Add caching support to llvm backend

This commit is contained in:
Lachlan Sneff
2019-04-19 13:54:48 -07:00
parent ed651055f3
commit 443663aa3f
9 changed files with 141 additions and 56 deletions

View File

@ -152,6 +152,7 @@ struct WasmModule
void *get_func(llvm::StringRef name) const;
bool _init_failed = false;
private:
std::unique_ptr<llvm::RuntimeDyld::MemoryManager> memory_manager;
std::unique_ptr<llvm::object::ObjectFile> object_file;
@ -164,6 +165,10 @@ extern "C"
{
*module_out = new WasmModule(mem_ptr, mem_size, callbacks);
if ((*module_out)->_init_failed) {
return RESULT_OBJECT_LOAD_FAILURE;
}
return RESULT_OK;
}