sammine-lang
Loading...
Searching...
No Matches
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"
9namespace sammine_lang {
10using namespace AST;
12
13public:
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
24class CodegenCommenter {
25
26public:
27 CodegenCommenter(LLVMRes &resPtr) {}
28};
29} // namespace sammine_lang
Holds declaration for all the AST Nodes.
Defined LLVMRes, which encapsulates the state of LLVM (Context, Modules, IRBuilder,...
Definition Ast.h:175
Definition CodegenUtils.h:11
Definition LLVMRes.h:39