sammine-lang
Loading...
Searching...
No Matches
include
codegen
CodegenUtils.h
1
2
#include <llvm/IR/DerivedTypes.h>
3
#include <llvm/IR/Function.h>
4
#include <llvm/IR/Instructions.h>
5
#include <llvm/IR/LLVMContext.h>
6
7
#include "
ast/AstDecl.h
"
8
#include "
codegen/LLVMRes.h
"
9
namespace
sammine_lang {
10
using namespace
AST;
11
class
CodegenUtils
{
12
13
public
:
14
static
llvm::AllocaInst *CreateEntryBlockAlloca(llvm::Function *TheFunction,
15
const
std::string &VarName,
16
llvm::Type *);
17
18
static
bool
isFunctionMain(
FuncDefAST
*);
19
static
bool
hasFunctionMain(
ProgramAST
*);
20
21
static
llvm::FunctionType *declare_malloc(llvm::Module &);
22
};
23
24
class
CodegenCommenter {
25
26
public
:
27
CodegenCommenter(
LLVMRes
&resPtr) {}
28
};
29
}
// namespace sammine_lang
AstDecl.h
Holds declaration for all the AST Nodes.
LLVMRes.h
Defined LLVMRes, which encapsulates the state of LLVM (Context, Modules, IRBuilder,...
sammine_lang::AST::FuncDefAST
Definition
Ast.h:175
sammine_lang::AST::ProgramAST
Definition
Ast.h:24
sammine_lang::CodegenUtils
Definition
CodegenUtils.h:11
sammine_lang::LLVMRes
Definition
LLVMRes.h:39
Generated by
1.13.2