Use LLVM to JIT the code for one of the drawer functions

This commit is contained in:
Magnus Norddahl 2016-09-26 09:00:19 +02:00
commit 3dd8b593b6
52 changed files with 4705 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#pragma once
#include <string>
#include <vector>
namespace llvm { class Value; }
namespace llvm { class Type; }
namespace llvm { class Function; }
class SSAInt;
class SSAValue;
class SSAFunction
{
public:
SSAFunction(const std::string name);
void set_return_type(llvm::Type *type);
void add_parameter(llvm::Type *type);
void create_public();
void create_private();
SSAValue parameter(int index);
llvm::Function *func;
private:
std::string name;
llvm::Type *return_type;
std::vector<llvm::Type *> parameters;
};