From 29974e3c079f19ff1573eb9c5610f3c88999198f Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 24 Jan 2020 21:44:26 -0500 Subject: [PATCH] Fixed porting error --- pl0/pl0.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pl0/pl0.cc b/pl0/pl0.cc index 4595860..4dd2160 100644 --- a/pl0/pl0.cc +++ b/pl0/pl0.cc @@ -604,9 +604,7 @@ struct LLVM { FunctionType::get(builder_.getInt32Ty(), PointerType::get(builder_.getInt8Ty(), 0), true)); - // auto outC = module_->getOrInsertFunction( - // "out", builder_.getVoidTy(), builder_.getInt32Ty()); - auto funccallee = module_->getOrInsertFunction("out", builder_.getInt32Ty()); + auto funccallee = module_->getOrInsertFunction("out", builder_.getVoidTy(), builder_.getInt32Ty()); auto outC = funccallee.getCallee(); auto outF = cast(outC); @@ -625,7 +623,6 @@ struct LLVM { } void compile_program(const shared_ptr ast) { - // auto c = module_->getOrInsertFunction("main", builder_.getVoidTy()); auto funccallee = module_->getOrInsertFunction("main", builder_.getVoidTy()); auto c = funccallee.getCallee(); auto fn = cast(c);