Let DValue types handle memory-only types consistently

I.e., disallow memory-only values from being represented as DImValues
and disallow getRVal() for such types instead of returning the address.
This commit is contained in:
Martin 2016-06-05 16:15:37 +02:00
parent c1c285782d
commit 963a10b225
15 changed files with 221 additions and 223 deletions

View file

@ -1037,8 +1037,8 @@ DValue *DtoArgument(Parameter *fnarg, Expression *argexp) {
if (fnarg && (fnarg->storageClass & (STCref | STCout))) {
Loc loc;
DValue *arg = toElem(argexp, true);
return new DImValue(argexp->type,
arg->isLVal() ? arg->getLVal() : makeLValue(loc, arg));
return new DVarValue(argexp->type,
arg->isLVal() ? arg->getLVal() : makeLValue(loc, arg));
}
DValue *arg = toElem(argexp);