aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm.cpp b/llvm.cpp
index 1d97b96..053e2e2 100644
--- a/llvm.cpp
+++ b/llvm.cpp
@@ -88,11 +88,12 @@ struct LLVMEngine : public Engine {
vector<const Type*> cprot;
for (size_t i = 0; i < argsT.size(); ++i) {
AType* at = argsT.at(i)->as<AType*>();
- THROW_IF(!llType(at), Cursor(), "function parameter is untyped")
+ THROW_IF(!llType(at), Cursor(), string("parameter has non-concrete type ")
+ + at->str())
cprot.push_back(llType(at));
}
- THROW_IF(!llType(retT), Cursor(), "function return is untyped");
+ THROW_IF(!llType(retT), Cursor(), "return has non-concrete type");
FunctionType* fT = FunctionType::get(llType(retT), cprot, false);
Function* f = Function::Create(fT, linkage, name, module);
@@ -138,7 +139,7 @@ struct LLVMEngine : public Engine {
void* fp = engine->getPointerToFunction(llFunc(f));
const Type* t = llType(retT);
THROW_IF(!fp, Cursor(), "unable to get function pointer");
- THROW_IF(!t, Cursor(), "function with non-primitive return type called");
+ THROW_IF(!t, Cursor(), "function with non-concrete return type called");
std::stringstream ss;
if (t == Type::Int32Ty)