From d68c73f6c6e04f02d153d1b879463e0a3fd6f218 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 27 Jan 2009 18:39:17 +0000 Subject: Shrink. git-svn-id: http://svn.drobilla.net/resp/llvm-lisp@25 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- ll.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ll.cpp b/ll.cpp index 824f8a7..1441171 100644 --- a/ll.cpp +++ b/ll.cpp @@ -544,15 +544,12 @@ compose(const TSubst& delta, const TSubst& gamma) // TAPL 22.1.1 { TSubst r; for (TSubst::const_iterator g = gamma.begin(); g != gamma.end(); ++g) { - TSubst::const_iterator i = delta.find(g->second); - if (i != delta.end()) - r.insert(make_pair(g->first, ((i != delta.end()) ? i : g)->second)); - else - r.insert(make_pair(g->first, g->second)); + TSubst::const_iterator d = delta.find(g->second); + r.insert(make_pair(g->first, ((d != delta.end()) ? d : g)->second)); } for (TSubst::const_iterator d = delta.begin(); d != delta.end(); ++d) { if (gamma.find(d->first) == gamma.end()) - r.insert(make_pair(d->first, d->second)); + r.insert(*d); } return r; } @@ -667,11 +664,11 @@ compileFunction(CEnv& cenv, const std::string& name, ASTTuple& prot, const Type* vector cprot; for (size_t i = 0; i < texp.size(); ++i) { const Type* t = cenv.tenv.type(texp[i])->ctype; - if (!t) throw CompileError("Function prototype contains NULL"); + if (!t) throw CompileError("Function parameter is untyped"); cprot.push_back(t); } - if (!retT) throw CompileError("Function return value type is NULL"); + if (!retT) throw CompileError("Function return is untyped"); FunctionType* fT = FunctionType::get(retT, cprot, false); Function* f = Function::Create(fT, linkage, name, cenv.module); -- cgit v1.2.1