mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-28 02:23:13 +01:00
D2: pass static arrays into functions by value
This commit is contained in:
@@ -144,7 +144,7 @@ void ReturnStatement::toIR(IRState* p)
|
||||
// If the function returns a struct or a static array, and the return
|
||||
// value is a pointer to a struct or a static array, load from it
|
||||
// before returning.
|
||||
int ty = f->type->next->ty;
|
||||
int ty = f->type->next->toBasetype()->ty;
|
||||
if (v->getType() != p->topfunc()->getReturnType() &&
|
||||
(ty == Tstruct
|
||||
#if DMDV2
|
||||
|
||||
Reference in New Issue
Block a user