mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Fixed passing of structs and static arrays into functions.
Not sure if it is correct, though.
This commit is contained in:
parent
81e0203a6c
commit
e9dacd97e2
2 changed files with 10 additions and 2 deletions
|
@ -752,8 +752,11 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
|
||||
bool refout = vd->storage_class & (STCref | STCout);
|
||||
bool lazy = vd->storage_class & STClazy;
|
||||
|
||||
#if DMDV2
|
||||
if (!refout)
|
||||
#else
|
||||
if (!refout && (!f->fty.args[i]->byref || lazy))
|
||||
#endif
|
||||
{
|
||||
// alloca a stack slot for this first class value arg
|
||||
const LLType* argt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue