From 3ebef61c5b942de674bebe32844f33ee7bda304b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 12 Jan 2015 15:25:46 +0100 Subject: [PATCH] Fix portability problems --- libevmjit/Cache.cpp | 4 ++-- libevmjit/Ext.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libevmjit/Cache.cpp b/libevmjit/Cache.cpp index 2311c0496..0b725bc24 100644 --- a/libevmjit/Cache.cpp +++ b/libevmjit/Cache.cpp @@ -45,7 +45,7 @@ std::unique_ptr Cache::getObject(std::string const& id) { auto module = std::unique_ptr(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; diff --git a/libevmjit/Ext.cpp b/libevmjit/Ext.cpp index cd741ad24..f0767d9e0 100644 --- a/libevmjit/Ext.cpp +++ b/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"); }