[clang] [CIR] Support single level Cleanup scope (PR #180276)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 09:59:19 PST 2026
================
@@ -309,6 +354,9 @@ void CIRGenFunction::popCleanupBlock() {
assert(!cir::MissingFeatures::ehCleanupScopeRequiresEHCleanup());
ehStack.popCleanup();
scope.markEmitted();
+
+ mlir::OpBuilder::InsertionGuard guard(builder);
+ builder.setInsertionPointToStart(&cleanScope.getCleanupRegion().back());
emitCleanup(*this, cleanup, cleanupFlags);
----------------
AmrDeveloper wrote:
I have one terminator interested in cleaning up the body from the start, and the other one I inserted into the scope body before i pop the Scope, I will apply the changes and try locally
https://github.com/llvm/llvm-project/pull/180276
More information about the cfe-commits
mailing list