Fixed passing of structs and static arrays into functions.

Not sure if it is correct, though.
This commit is contained in:
Alexey Prokhin
2011-01-06 17:07:44 +03:00
parent 81e0203a6c
commit e9dacd97e2
2 changed files with 10 additions and 2 deletions

View File

@@ -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);
}
//////////////////////////////////////////////////////////////////////////////