Fix more duplicate static array postblit calls

This commit is contained in:
David Nadlinger 2015-07-28 00:54:15 +02:00
parent daee7955d5
commit d2135d4ade
2 changed files with 5 additions and 3 deletions

View file

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

View file

@ -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))