Mercurial > projects > ldc
changeset 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 | f9333daa1bf5 |
children | 32ead42679d1 |
files | gen/abi-x86-64.cpp gen/functions.cpp |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/abi-x86-64.cpp Fri Mar 06 17:00:34 2009 +0100 +++ b/gen/abi-x86-64.cpp Fri Mar 06 19:12:48 2009 +0100 @@ -563,6 +563,7 @@ } bool X86_64TargetABI::passByVal(Type* t) { + t = t->toBasetype(); if (linkage() == LINKd) { if (t->ty != Tstruct) return false;
--- a/gen/functions.cpp Fri Mar 06 17:00:34 2009 +0100 +++ b/gen/functions.cpp Fri Mar 06 19:12:48 2009 +0100 @@ -185,7 +185,7 @@ } // reverse params? - if (f->fty->reverseParams && f->parameters->dim > 1) + if (f->fty->reverseParams && nargs2 > 1) { std::reverse(argtypes.begin() + beg, argtypes.end()); }