================
@@ -193,6 +192,25 @@ bool EHScopeStack::requiresCatchOrCleanup() const {
   return false;
 }
 
+/// Deactive a cleanup that was created in an active state.
+void CIRGenFunction::deactivateCleanupBlock(EHScopeStack::stable_iterator c,
+                                            mlir::Operation *dominatingIP) {
+  assert(c != ehStack.stable_end() && "deactivating bottom of stack?");
+  EHCleanupScope &scope = cast<EHCleanupScope>(*ehStack.find(c));
----------------
erichkeane wrote:

So this line (doing a `find` on an `iterator`) was pretty jarring!  Perhaps its 
the name that is particularly jarring (both being `stable_iterator`, then doing 
a `find` on it), but the interface here is pretty odd seeming.

Not sure what there is to do about it here (or if you just inherited this from 
classic-codegen), but something to keep in mind: this is particularly awkward 
compared to the STL definition of stack and find.

https://github.com/llvm/llvm-project/pull/184707
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to