Browse Source

Fix portability problems

cl-refactor
Paweł Bylica 10 years ago
parent
commit
3ebef61c5b
  1. 4
      libevmjit/Cache.cpp
  2. 4
      libevmjit/Ext.cpp

4
libevmjit/Cache.cpp

@ -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;

4
libevmjit/Ext.cpp

@ -23,8 +23,8 @@ namespace jit
Ext::Ext(RuntimeManager& _runtimeManager, Memory& _memoryMan):
RuntimeHelper(_runtimeManager),
m_memoryMan(_memoryMan),
m_funcs{},
m_argAllocas{}
m_funcs({}), // The only std::array initialization that works in both Visual Studio & GCC
m_argAllocas({})
{
m_size = m_builder.CreateAlloca(Type::Size, nullptr, "env.size");
}

Loading…
Cancel
Save