Fix portability problems

This commit is contained in:
Paweł Bylica 2015-01-12 15:25:46 +01:00
parent 85ef08a9a0
commit 3ebef61c5b
2 changed files with 4 additions and 4 deletions

View file

@ -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 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 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; return nullptr;
} }
@ -68,7 +68,7 @@ void ObjectCache::notifyObjectCompiled(llvm::Module const* _module, llvm::Memory
cacheFile << _object->getBuffer(); cacheFile << _object->getBuffer();
} }
llvm::MemoryBuffer* ObjectCache::getObject(llvm::Module const* _module) llvm::MemoryBuffer* ObjectCache::getObject(llvm::Module const*)
{ {
auto o = lastObject; auto o = lastObject;
lastObject = nullptr; lastObject = nullptr;

View file

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