Removed completely wrong postblit invocation.

This piece of code was invoking the postblit on the _source_
of the copy operation.
This commit is contained in:
David Nadlinger
2013-01-04 09:16:43 +01:00
parent 1a3fc9f97f
commit bcd8f26b26

View File

@@ -2993,24 +2993,6 @@ DValue* StructLiteralExp::toElem(IRState* p)
Logger::println("zeroing %d padding bytes", implicitPadding);
voidptr = write_zeroes(voidptr, offset - implicitPadding, offset);
}
#if DMDV2
Type *tb = vd->type->toBasetype();
if (tb->ty == Tstruct)
{
// Call postBlit()
StructDeclaration *sd = static_cast<TypeStruct *>(tb)->sym;
if (sd->postblit)
{
FuncDeclaration *fd = sd->postblit;
fd->codegen(Type::sir);
Expressions args;
DFuncValue dfn(fd, fd->ir.irFunc->func, val->getLVal());
DtoCallFunction(loc, Type::basic[Tvoid], &dfn, &args);
}
}
#endif
}
// initialize trailing padding
if (sd->structsize != offset)