[clang] [CIR] Simplify try-catch handling (PR #180857)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 11 09:12:33 PST 2026


================
@@ -280,224 +286,87 @@ mlir::LogicalResult CIRGenFunction::emitCXXTryStmt(const CXXTryStmt &s) {
         scopeIP = builder.saveInsertionPoint();
       });
 
+  // Set personality function if not already set
+  auto funcOp = mlir::cast<cir::FuncOp>(curFn);
+  if (!funcOp.getPersonality())
+    funcOp.setPersonality(getPersonalityFn(cgm, EHPersonality::get(*this)));
----------------
andykaylor wrote:

I don't think that's needed here. The intent is for the CIR catch handler representation to be target-independent at this level. The WASM- and funclet-specific details will be handled during EH target lowering.

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


More information about the cfe-commits mailing list