================
@@ -391,6 +394,13 @@ mlir::LogicalResult CIRGenFunction::emitCXXTryStmt(const
CXXTryStmt &s) {
// Fall out through the catch cleanups.
handlerScope.forceCleanup();
+
+ mlir::Block *block = &handler->getBlocks().back();
+ if (block->empty() ||
+ !block->back().hasTrait<mlir::OpTrait::IsTerminator>()) {
+ builder.setInsertionPointToEnd(block);
----------------
andykaylor wrote:
Do you need an insertion point guard here? This leaves the insertion point
inside the handler region.
https://github.com/llvm/llvm-project/pull/180276
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits