================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits