diff --git a/clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp b/clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp index ac126965a95a5..007d873ff5db6 100644 --- a/clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp @@ -708,6 +708,13 @@ void CIRGenFunction::emitCXXDeleteExpr(const CXXDeleteExpr *e) { deleteTy = getContext().getBaseElementType(deleteTy); ptr = ptr.withElementType(builder, convertTypeForMem(deleteTy)); + if (e->isArrayForm() && + cgm.getASTContext().getTargetInfo().emitVectorDeletingDtors( + cgm.getASTContext().getLangOpts())) { + cgm.errorNYI(e->getSourceRange(), + "emitCXXDeleteExpr: emitVectorDeletingDtors"); + } + if (e->isArrayForm()) { assert(!cir::MissingFeatures::deleteArray()); cgm.errorNYI(e->getSourceRange(), "emitCXXDeleteExpr: array delete"); diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp index b73071af2a5d4..885a32cf16862 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp @@ -738,7 +738,9 @@ void CIRGenFunction::emitDestructorBody(FunctionArgList &args) { // outside of the function-try-block, which means it's always // possible to delegate the destructor body to the complete // destructor. Do so. - if (dtorType == Dtor_Deleting) { + if (dtorType == Dtor_Deleting || dtorType == Dtor_VectorDeleting) { + if (cxxStructorImplicitParamValue && dtorType == Dtor_VectorDeleting) + cgm.errorNYI(dtor->getSourceRange(), "emitConditionalArrayDtorCall"); RunCleanupsScope dtorEpilogue(*this); enterDtorCleanups(dtor, Dtor_Deleting); if (haveInsertPoint()) { @@ -771,6 +773,7 @@ void CIRGenFunction::emitDestructorBody(FunctionArgList &args) { case Dtor_Comdat: llvm_unreachable("not expecting a COMDAT"); case Dtor_Deleting: + case Dtor_VectorDeleting: llvm_unreachable("already handled deleting case"); case Dtor_Complete: