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.
This commit is contained in:
Frits van Bommel
2009-03-06 19:12:48 +01:00
parent 3e15c659d1
commit 1c6c4bc361
2 changed files with 2 additions and 1 deletions

View File

@@ -563,6 +563,7 @@ bool X86_64TargetABI::returnInArg(TypeFunction* tf) {
}
bool X86_64TargetABI::passByVal(Type* t) {
t = t->toBasetype();
if (linkage() == LINKd) {
if (t->ty != Tstruct)
return false;

View File

@@ -185,7 +185,7 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest
}
// reverse params?
if (f->fty->reverseParams && f->parameters->dim > 1)
if (f->fty->reverseParams && nargs2 > 1)
{
std::reverse(argtypes.begin() + beg, argtypes.end());
}