[clang] [CIR] Add RunCleanupsScope RAII around loop bodies (PR #200461)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 11:03:46 PDT 2026


================
@@ -1101,11 +1089,6 @@ mlir::LogicalResult CIRGenFunction::emitWhileStmt(const WhileStmt &s) {
   auto whileStmtBuilder = [&]() -> mlir::LogicalResult {
     mlir::LogicalResult loopRes = mlir::success();
     assert(!cir::MissingFeatures::loopInfoStack());
-    // From LLVM: if there are any cleanups between here and the loop-exit
-    // scope, create a block to stage a loop exit along.
-    // We probably already do the right thing because of ScopeOp, but make
-    // sure we handle all cases.
-    assert(!cir::MissingFeatures::loopSpecificCleanupHandling());
----------------
andykaylor wrote:

Yes, I should have deleted it there.

https://github.com/llvm/llvm-project/pull/200461


More information about the cfe-commits mailing list