aboutsummaryrefslogtreecommitdiffstats
path: root/llvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm.cpp')
-rw-r--r--llvm.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm.cpp b/llvm.cpp
index ecfb735..78ab5cc 100644
--- a/llvm.cpp
+++ b/llvm.cpp
@@ -266,9 +266,9 @@ ASTCall::lift(CEnv& cenv)
// Extend environment with bound and typed parameters
cenv.push();
if (c->prot()->size() < size() - 1)
- throw Error((format("too many arguments to function `%1%'") % at(0)->str()).str(), exp.loc);
+ throw Error((format("too many arguments to function `%1%'") % at(0)->str()).str(), loc);
if (c->prot()->size() > size() - 1)
- throw Error((format("too few arguments to function `%1%'") % at(0)->str()).str(), exp.loc);
+ throw Error((format("too few arguments to function `%1%'") % at(0)->str()).str(), loc);
for (size_t i = 1; i < size(); ++i)
cenv.code.def(checked_cast<ASTSymbol*>(c->prot()->at(i-1)), at(i));
@@ -282,7 +282,7 @@ ASTCall::compile(CEnv& cenv)
{
AST* c = maybeLookup(cenv, at(0));
Function* f = dynamic_cast<Function*>(LLVal(cenv.compile(c)));
- if (!f) throw Error("callee failed to compile", exp.loc);
+ if (!f) throw Error("callee failed to compile", loc);
vector<Value*> params(size() - 1);
for (size_t i = 1; i < size(); ++i)
@@ -295,7 +295,7 @@ void
ASTDefinition::lift(CEnv& cenv)
{
if (cenv.code.ref(checked_cast<ASTSymbol*>(at(1))))
- throw Error(string("`") + at(1)->str() + "' redefined", exp.loc);
+ throw Error(string("`") + at(1)->str() + "' redefined", loc);
cenv.code.def((ASTSymbol*)at(1), at(2)); // Define first for recursion
at(2)->lift(cenv);
}
@@ -390,7 +390,7 @@ ASTPrimitive::compile(CEnv& cenv)
return cenv.engine.builder.CreateFCmp(pred, a, b);
}
- throw Error("Unknown primitive", exp.loc);
+ throw Error("unknown primitive", loc);
}
AType*