mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
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:
18
gen/toir.cpp
18
gen/toir.cpp
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user