Browse Source

Unused rt_exit() function removed

[#80660432]
cl-refactor
Paweł Bylica 10 years ago
parent
commit
5a6d8b3d2f
  1. 2
      evmcc/GasMeter.cpp
  2. 1
      evmcc/GasMeter.h
  3. 8
      evmcc/Runtime.cpp

2
evmcc/GasMeter.cpp

@ -84,8 +84,6 @@ GasMeter::GasMeter(llvm::IRBuilder<>& _builder, llvm::Module* _module) :
m_gas = new llvm::GlobalVariable(*_module, Type::i256, false, llvm::GlobalVariable::ExternalLinkage, nullptr, "gas");
m_gas->setUnnamedAddr(true); // Address is not important
m_rtExit = llvm::Function::Create(llvm::FunctionType::get(Type::Void, Type::MainReturn, false), llvm::Function::ExternalLinkage, "rt_exit", _module);
m_gasCheckFunc = llvm::Function::Create(llvm::FunctionType::get(Type::Void, Type::i256, false), llvm::Function::PrivateLinkage, "gas.check", _module);
InsertPointGuard guard(m_builder);

1
evmcc/GasMeter.h

@ -41,7 +41,6 @@ private:
llvm::IRBuilder<>& m_builder;
llvm::CallInst* m_checkCall = nullptr;
llvm::GlobalVariable* m_gas;
llvm::Function* m_rtExit;
llvm::Function* m_gasCheckFunc;
};

8
evmcc/Runtime.cpp

@ -13,14 +13,6 @@ static Runtime* g_runtime;
extern "C"
{
EXPORT i256 gas;
EXPORT void rt_exit(int32_t _returnCode)
{
auto returnCode = static_cast<ReturnCode>(_returnCode);
if (returnCode == ReturnCode::OutOfGas)
BOOST_THROW_EXCEPTION(dev::eth::OutOfGas());
}
}
Runtime::Runtime(dev::u256 _gas, std::unique_ptr<dev::eth::ExtVMFace> _ext):

Loading…
Cancel
Save