diff --git a/evmjit/libevmjit/CompilerHelper.h b/evmjit/libevmjit/CompilerHelper.h index 5eeae9a6e..22f72f1e1 100644 --- a/evmjit/libevmjit/CompilerHelper.h +++ b/evmjit/libevmjit/CompilerHelper.h @@ -49,7 +49,15 @@ private: RuntimeManager& m_runtimeManager; }; -using InsertPointGuard = llvm::IRBuilderBase::InsertPointGuard; +struct InsertPointGuard +{ + explicit InsertPointGuard(llvm::IRBuilderBase& _builder): m_builder(_builder), m_insertPoint(_builder.saveIP()) {} + ~InsertPointGuard() { m_builder.restoreIP(m_insertPoint); } + +private: + llvm::IRBuilderBase& m_builder; + decltype(m_builder.saveIP()) m_insertPoint; +}; } }