mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 10:57:35 +03:00
Fix more duplicate static array postblit calls
This commit is contained in:
parent
daee7955d5
commit
d2135d4ade
2 changed files with 5 additions and 3 deletions
|
@ -787,8 +787,8 @@ void DtoCatAssignElement(Loc& loc, Type* arrayType, DValue* array, Expression* e
|
||||||
appendedArray = DtoAggrPaint(appendedArray, DtoType(arrayType));
|
appendedArray = DtoAggrPaint(appendedArray, DtoType(arrayType));
|
||||||
|
|
||||||
LLValue* val = DtoArrayPtr(array);
|
LLValue* val = DtoArrayPtr(array);
|
||||||
val = DtoGEP1(val, oldLength, "lastElem");
|
val = DtoGEP1(val, oldLength, ".lastElem");
|
||||||
DtoAssign(loc, new DVarValue(arrayType->nextOf(), val), expVal);
|
DtoAssign(loc, new DVarValue(arrayType->nextOf(), val), expVal, TOKblit);
|
||||||
callPostblit(loc, exp, val);
|
callPostblit(loc, exp, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,9 @@ public:
|
||||||
DValue* e = toElemDtor(stmt->exp);
|
DValue* e = toElemDtor(stmt->exp);
|
||||||
// store return value
|
// store return value
|
||||||
if (rvar->getLVal() != e->getRVal())
|
if (rvar->getLVal() != e->getRVal())
|
||||||
DtoAssign(stmt->loc, rvar, e);
|
{
|
||||||
|
DtoAssign(stmt->loc, rvar, e, TOKblit);
|
||||||
|
}
|
||||||
|
|
||||||
// call postblit if necessary
|
// call postblit if necessary
|
||||||
if (!irs->func()->type->isref && !(f->decl->nrvo_can && f->decl->nrvo_var))
|
if (!irs->func()->type->isref && !(f->decl->nrvo_can && f->decl->nrvo_var))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue