mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 04:43:14 +01:00
Fixed passing of structs and static arrays into functions.
Not sure if it is correct, though.
This commit is contained in:
@@ -86,7 +86,12 @@ void IrFuncTy::getParam(Type* dty, int idx, DValue* val, llvm::Value* lval)
|
||||
return;
|
||||
}
|
||||
|
||||
DtoStore(val->getRVal(), lval);
|
||||
LLValue *rval = val->getRVal();
|
||||
#if DMDV2
|
||||
if (DtoIsPassedByRef(val->type))
|
||||
rval = DtoLoad(rval);
|
||||
#endif
|
||||
DtoStore(rval, lval);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user