Mercurial > projects > ldc
comparison gen/functions.cpp @ 1049:afe271b0e271
Two small bugfixes:
- See through typedefs and enums in passByVal
- Don't depend on TypeFunction::parameters->dim being the actual number of
parameters; it contains unexpanded tuples as single elements.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 06 Mar 2009 19:12:48 +0100 |
parents | 6bb04dbee21f |
children | dc608dc33081 |
comparison
equal
deleted
inserted
replaced
1048:f9333daa1bf5 | 1049:afe271b0e271 |
---|---|
183 { | 183 { |
184 argtypes.push_back(f->fty->args[i]->ltype); | 184 argtypes.push_back(f->fty->args[i]->ltype); |
185 } | 185 } |
186 | 186 |
187 // reverse params? | 187 // reverse params? |
188 if (f->fty->reverseParams && f->parameters->dim > 1) | 188 if (f->fty->reverseParams && nargs2 > 1) |
189 { | 189 { |
190 std::reverse(argtypes.begin() + beg, argtypes.end()); | 190 std::reverse(argtypes.begin() + beg, argtypes.end()); |
191 } | 191 } |
192 | 192 |
193 llvm::FunctionType* functype = llvm::FunctionType::get(f->fty->ret->ltype, argtypes, f->fty->c_vararg); | 193 llvm::FunctionType* functype = llvm::FunctionType::get(f->fty->ret->ltype, argtypes, f->fty->c_vararg); |