mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-22 07:05:22 +02:00
Follow the D ABI and pass the last arg in a register if it is a struct that fits.
This commit is contained in:
@@ -2691,10 +2691,11 @@ TypeFunction::TypeFunction(Arguments *parameters, Type *treturn, int varargs, en
|
||||
this->retInPtr = false;
|
||||
this->usesThis = false;
|
||||
this->usesNest = false;
|
||||
this->structInregArg = false;
|
||||
this->retAttrs = 0;
|
||||
this->thisAttrs = 0;
|
||||
this->reverseParams = false;
|
||||
this->reverseIndex = 0;
|
||||
this->firstRealArg = 0;
|
||||
}
|
||||
|
||||
Type *TypeFunction::syntaxCopy()
|
||||
@@ -2708,7 +2709,7 @@ Type *TypeFunction::syntaxCopy()
|
||||
t->retAttrs = retAttrs;
|
||||
t->thisAttrs = thisAttrs;
|
||||
t->reverseParams = reverseParams;
|
||||
t->reverseIndex = reverseIndex;
|
||||
t->firstRealArg = firstRealArg;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
@@ -438,11 +438,13 @@ struct TypeFunction : Type
|
||||
bool retInPtr;
|
||||
bool usesThis;
|
||||
bool usesNest;
|
||||
bool structInregArg;
|
||||
unsigned retAttrs;
|
||||
unsigned thisAttrs; // also used for nest
|
||||
// parameter index in the llvm function that contains the first not-implicit arg
|
||||
size_t firstRealArg;
|
||||
|
||||
bool reverseParams;
|
||||
size_t reverseIndex;
|
||||
};
|
||||
|
||||
struct TypeDelegate : Type
|
||||
|
||||
Reference in New Issue
Block a user