3 #include <llvm/IR/MDBuilder.h> 34 Word = llvm::Type::getIntNTy(_context, 256);
36 Bool = llvm::Type::getInt1Ty(_context);
37 Size = llvm::Type::getInt64Ty(_context);
40 Byte = llvm::Type::getInt8Ty(_context);
42 Void = llvm::Type::getVoidTy(_context);
45 EnvPtr = llvm::StructType::create(_context,
"Env")->getPointerTo();
51 expectTrue = llvm::MDBuilder{_context}.createBranchWeights(1, 0);
57 return llvm::ConstantInt::getSigned(Type::Word, _n);
62 return llvm::ConstantInt::get(Type::Word->getContext(), _n);
67 return llvm::ConstantInt::get(Type::MainReturn, static_cast<uint64_t>(_returnCode));
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
static llvm::PointerType * RuntimePtr
static llvm::PointerType * WordPtr
static llvm::StructType * getRuntimeType()
static llvm::PointerType * BytePtr
static llvm::StructType * getRuntimeDataType()
static llvm::IntegerType * Word
static llvm::ConstantInt * gasMax
static llvm::ConstantInt * get(int64_t _n)
Returns word-size constant.
static llvm::IntegerType * MainReturn
Main function return type.
static llvm::PointerType * RuntimeDataPtr
static llvm::PointerType * GasPtr
static llvm::IntegerType * Bool
static llvm::IntegerType * Size
static void init(llvm::LLVMContext &_context)
static llvm::MDNode * expectTrue
static llvm::IntegerType * Gas
static llvm::PointerType * EnvPtr
static llvm::IntegerType * Byte