|
|
@ -45,7 +45,7 @@ std::unique_ptr<llvm::Module> Cache::getObject(std::string const& id) |
|
|
|
{ |
|
|
|
auto module = std::unique_ptr<llvm::Module>(new llvm::Module(id, llvm::getGlobalContext())); |
|
|
|
auto mainFuncType = llvm::FunctionType::get(llvm::IntegerType::get(llvm::getGlobalContext(), 32), {}, false); |
|
|
|
auto func = llvm::Function::Create(mainFuncType, llvm::Function::ExternalLinkage, id, module.get()); |
|
|
|
llvm::Function::Create(mainFuncType, llvm::Function::ExternalLinkage, id, module.get()); |
|
|
|
} |
|
|
|
return nullptr; |
|
|
|
} |
|
|
@ -68,7 +68,7 @@ void ObjectCache::notifyObjectCompiled(llvm::Module const* _module, llvm::Memory |
|
|
|
cacheFile << _object->getBuffer(); |
|
|
|
} |
|
|
|
|
|
|
|
llvm::MemoryBuffer* ObjectCache::getObject(llvm::Module const* _module) |
|
|
|
llvm::MemoryBuffer* ObjectCache::getObject(llvm::Module const*) |
|
|
|
{ |
|
|
|
auto o = lastObject; |
|
|
|
lastObject = nullptr; |
|
|
|