diff options
Diffstat (limited to 'llvm.cpp')
-rw-r--r-- | llvm.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |