Remove getContainedType from DtoMemSetZero (#4157)

This commit is contained in:
Nicholas Wilson 2022-09-13 21:39:05 +08:00 committed by GitHub
parent a433746018
commit 838146be71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 12 deletions

View file

@ -254,7 +254,7 @@ void DtoArrayAssign(const Loc &loc, DValue *lhs, DValue *rhs, EXP op,
const size_t elementSize = getTypeAllocSize(DtoMemType(elemType));
if (rhs->isNull()) {
LLValue *lhsSize = computeSize(lhsLength, elementSize);
DtoMemSetZero(lhsPtr, lhsSize);
DtoMemSetZero(getI8Type(), lhsPtr, lhsSize);
} else {
bool knownInBounds =
isConstructing || (t->ty == TY::Tsarray && t2->ty == TY::Tsarray);