At least we got an empty Module now ...
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
#include "AST/CodeGenVisitor.h"
|
||||
|
||||
CodeGenVisitor::CodeGenVisitor() {
|
||||
CodeGenVisitor::CodeGenVisitor(llvm::Module* module, llvm::FunctionPassManager *fpm) {
|
||||
builder_ = new llvm::IRBuilder<>(llvm::getGlobalContext());
|
||||
module_ = module;
|
||||
fpm_ = fpm;
|
||||
}
|
||||
|
||||
CodeGenVisitor::~CodeGenVisitor() {
|
||||
//
|
||||
delete builder_;
|
||||
}
|
||||
|
||||
void CodeGenVisitor::visit(AssignmentExpression* e) {
|
||||
|
||||
@@ -105,7 +105,7 @@ int main() {
|
||||
|
||||
fpm->doInitialization();
|
||||
|
||||
CodeGenVisitor* cv = new CodeGenVisitor();
|
||||
CodeGenVisitor* cv = new CodeGenVisitor(module, fpm);
|
||||
|
||||
void* parser = scullyParserAlloc(malloc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user