mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Add Type::RuntimePtr predefined LLVM type
This commit is contained in:
parent
c388a81cff
commit
693c4b3dfa
2 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include <llvm/IR/DerivedTypes.h>
|
#include <llvm/IR/DerivedTypes.h>
|
||||||
|
|
||||||
|
#include "Runtime.h"
|
||||||
|
|
||||||
namespace dev
|
namespace dev
|
||||||
{
|
{
|
||||||
namespace eth
|
namespace eth
|
||||||
|
|
@ -18,6 +20,7 @@ llvm::IntegerType* Type::Byte;
|
||||||
llvm::PointerType* Type::BytePtr;
|
llvm::PointerType* Type::BytePtr;
|
||||||
llvm::Type* Type::Void;
|
llvm::Type* Type::Void;
|
||||||
llvm::IntegerType* Type::MainReturn;
|
llvm::IntegerType* Type::MainReturn;
|
||||||
|
llvm::PointerType* Type::RuntimePtr;
|
||||||
|
|
||||||
void Type::init(llvm::LLVMContext& _context)
|
void Type::init(llvm::LLVMContext& _context)
|
||||||
{
|
{
|
||||||
|
|
@ -30,6 +33,7 @@ void Type::init(llvm::LLVMContext& _context)
|
||||||
BytePtr = Byte->getPointerTo();
|
BytePtr = Byte->getPointerTo();
|
||||||
Void = llvm::Type::getVoidTy(_context);
|
Void = llvm::Type::getVoidTy(_context);
|
||||||
MainReturn = llvm::Type::getInt32Ty(_context);
|
MainReturn = llvm::Type::getInt32Ty(_context);
|
||||||
|
RuntimePtr = RuntimeData::getType()->getPointerTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::ConstantInt* Constant::get(uint64_t _n)
|
llvm::ConstantInt* Constant::get(uint64_t _n)
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ struct Type
|
||||||
/// Main function return type
|
/// Main function return type
|
||||||
static llvm::IntegerType* MainReturn;
|
static llvm::IntegerType* MainReturn;
|
||||||
|
|
||||||
|
static llvm::PointerType* RuntimePtr;
|
||||||
|
|
||||||
static void init(llvm::LLVMContext& _context);
|
static void init(llvm::LLVMContext& _context);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue