aboutsummaryrefslogtreecommitdiffstats
path: root/llvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm.cpp')
-rw-r--r--llvm.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm.cpp b/llvm.cpp
index f4576ce..f9e045a 100644
--- a/llvm.cpp
+++ b/llvm.cpp
@@ -237,7 +237,6 @@ AClosure::lift(CEnv& cenv)
CValue retVal = cenv.compile(at(2));
llengine(cenv)->builder.CreateRet(LLVal(retVal)); // Finish function
cenv.optimise(LLFunc(f));
-
} catch (Error& e) {
f->eraseFromParent(); // Error reading body, remove function
cenv.pop();
@@ -501,7 +500,7 @@ AConsCall::lift(CEnv& cenv)
ACall::lift(cenv);
- ATuple* prot = new ATuple(loc, at(1), at(2), 0);
+ ATuple* protT = new ATuple(loc, cenv.type(at(1)), cenv.type(at(2)), 0);
vector<const Type*> types;
size_t sz = 0;
@@ -521,7 +520,7 @@ AConsCall::lift(CEnv& cenv)
vector<string> argNames;
argNames.push_back("car");
argNames.push_back("cdr");
- Function* func = compileFunction(cenv, cenv.gensym("cons"), pT, *prot, argNames);
+ Function* func = compileFunction(cenv, cenv.gensym("cons"), pT, *protT, argNames);
Value* mem = builder.CreateCall(LLVal(cenv.alloc), ConstantInt::get(Type::Int32Ty, sz), "mem");
Value* cell = builder.CreateBitCast(mem, pT, "cell");