mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
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:
parent
c1c285782d
commit
963a10b225
15 changed files with 221 additions and 223 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue