mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
Use llvm.longjmp intrinsic for longjmp [Delivers #81792986]
This commit is contained in:
parent
8ee32d9197
commit
a44a7ab4ad
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <llvm/IR/GlobalVariable.h>
|
#include <llvm/IR/GlobalVariable.h>
|
||||||
#include <llvm/IR/Function.h>
|
#include <llvm/IR/Function.h>
|
||||||
|
#include <llvm/IR/IntrinsicInst.h>
|
||||||
|
|
||||||
#include <libevm/VM.h>
|
#include <libevm/VM.h>
|
||||||
|
|
||||||
|
|
@ -105,7 +106,7 @@ RuntimeManager::RuntimeManager(llvm::IRBuilder<>& _builder): CompilerHelper(_bui
|
||||||
{
|
{
|
||||||
m_dataPtr = new llvm::GlobalVariable(*getModule(), Type::RuntimePtr, false, llvm::GlobalVariable::PrivateLinkage, llvm::UndefValue::get(Type::RuntimePtr), "rt");
|
m_dataPtr = new llvm::GlobalVariable(*getModule(), Type::RuntimePtr, false, llvm::GlobalVariable::PrivateLinkage, llvm::UndefValue::get(Type::RuntimePtr), "rt");
|
||||||
llvm::Type* args[] = {Type::BytePtr, m_builder.getInt32Ty()};
|
llvm::Type* args[] = {Type::BytePtr, m_builder.getInt32Ty()};
|
||||||
m_longjmp = llvm::Function::Create(llvm::FunctionType::get(Type::Void, args, false), llvm::Function::ExternalLinkage, "longjmp", getModule());
|
m_longjmp = llvm::Intrinsic::getDeclaration(getModule(), llvm::Intrinsic::longjmp);
|
||||||
|
|
||||||
// Export data
|
// Export data
|
||||||
auto mainFunc = getMainFunction();
|
auto mainFunc = getMainFunction();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue