Remove getContainedType from DtoArrayAssign (#4165)

This commit is contained in:
Nicholas Wilson 2022-09-14 18:58:25 +08:00 committed by GitHub
parent fc979b36c1
commit a94262f509
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -293,7 +293,7 @@ void DtoArrayAssign(const Loc &loc, DValue *lhs, DValue *rhs, EXP op,
if (!needsDestruction && !needsPostblit) {
// fast version
const size_t lhsElementSize =
getTypeAllocSize(realLhsPtr->getType()->getContainedType(0));
getTypeAllocSize(DtoMemType(lhs->type->nextOf()));
LLType *rhsType = DtoMemType(t2);
const size_t rhsSize = getTypeAllocSize(rhsType);
LLValue *actualPtr = DtoBitCast(realLhsPtr, rhsType->getPointerTo());