Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,13 @@ void CIRGenFunction::emitCXXDeleteExpr(const CXXDeleteExpr *e) {
deleteTy = getContext().getBaseElementType(deleteTy);
ptr = ptr.withElementType(builder, convertTypeForMem(deleteTy));

if (e->isArrayForm() &&
cgm.getContext().getTargetInfo().emitVectorDeletingDtors(
cgm.getContext().getLangOpts())) {
cgm.errorNYI(e->getSourceRange(),
"emitCXXDeleteExpr: emitVectorDeletingDtors");
}

if (e->isArrayForm()) {
assert(!cir::MissingFeatures::deleteArray());
cgm.errorNYI(e->getSourceRange(), "emitCXXDeleteExpr: array delete");
Expand Down
5 changes: 4 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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:
Expand Down
Loading