mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-12 06:49:02 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user