Do not invoke postblit twice on struct literal creation.

The frontend seems to explicitly insert __cpctor now.

Fixes DMD testcase 'sdtor'.
This commit is contained in:
David Nadlinger
2013-06-14 16:42:34 +02:00
parent 86563a2ee1
commit 9dc387aa91

View File

@@ -2912,7 +2912,7 @@ DValue* StructLiteralExp::toElem(IRState* p)
DVarValue field(vd->type, vd, DtoIndexStruct(mem, sd, vd));
// store the initializer there
DtoAssign(loc, &field, val, TOKconstruct);
DtoAssign(loc, &field, val, TOKconstruct, true);
if (expr)
callPostblit(loc, expr, field.getLVal());