@@ -812,13 +812,16 @@ namespace {
812812struct DestroyObject final : EHScopeStack::Cleanup {
813813 DestroyObject (Address addr, QualType type,
814814 CIRGenFunction::Destroyer *destroyer)
815- : addr(addr), type(type), destroyer(destroyer) {}
815+ : addr(addr), type(type), destroyer(destroyer) {
816+ assert (!cir::MissingFeatures::useEHCleanupForArray ());
817+ }
816818
817819 Address addr;
818820 QualType type;
819821 CIRGenFunction::Destroyer *destroyer;
820822
821- void emit (CIRGenFunction &cgf) override {
823+ void emit (CIRGenFunction &cgf, Flags flags) override {
824+ assert (!cir::MissingFeatures::useEHCleanupForArray ());
822825 cgf.emitDestroy (addr, type, destroyer);
823826 }
824827};
@@ -831,7 +834,7 @@ template <class Derived> struct DestroyNRVOVariable : EHScopeStack::Cleanup {
831834 Address addr;
832835 QualType ty;
833836
834- void emit (CIRGenFunction &cgf) override {
837+ void emit (CIRGenFunction &cgf, Flags flags ) override {
835838 assert (!cir::MissingFeatures::cleanupDestroyNRVOVariable ());
836839 }
837840
@@ -855,7 +858,7 @@ struct DestroyNRVOVariableCXX final
855858struct CallStackRestore final : EHScopeStack::Cleanup {
856859 Address stack;
857860 CallStackRestore (Address stack) : stack(stack) {}
858- void emit (CIRGenFunction &cgf) override {
861+ void emit (CIRGenFunction &cgf, Flags flags ) override {
859862 mlir::Location loc = stack.getPointer ().getLoc ();
860863 mlir::Value v = cgf.getBuilder ().createLoad (loc, stack);
861864 cgf.getBuilder ().createStackRestore (loc, v);
@@ -957,6 +960,7 @@ void CIRGenFunction::emitDestroy(Address addr, QualType type,
957960 return ;
958961
959962 mlir::Value begin = addr.getPointer ();
963+ assert (!cir::MissingFeatures::useEHCleanupForArray ());
960964 emitArrayDestroy (begin, length, type, elementAlign, destroyer);
961965
962966 // If the array destroy didn't use the length op, we can erase it.
@@ -1029,7 +1033,7 @@ void CIRGenFunction::emitAutoVarTypeCleanup(
10291033 if (!destroyer)
10301034 destroyer = getDestroyer (dtorKind);
10311035
1032- assert (!cir::MissingFeatures::ehCleanupFlags ());
1036+ assert (!cir::MissingFeatures::useEHCleanupForArray ());
10331037 ehStack.pushCleanup <DestroyObject>(cleanupKind, addr, type, destroyer);
10341038}
10351039
0 commit comments