[clang] [CIR] Upstream Exception EhInflight op (PR #165621)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 3 13:09:41 PST 2025
================
@@ -3002,6 +3002,88 @@ mlir::LogicalResult CIRToLLVMAllocExceptionOpLowering::matchAndRewrite(
return mlir::success();
}
+static mlir::LLVM::LLVMStructType
+getLLVMLandingPadStructTy(mlir::ConversionPatternRewriter &rewriter) {
+ // Create the landing pad type: struct { ptr, i32 }
+ mlir::MLIRContext *ctx = rewriter.getContext();
+ auto llvmPtr = mlir::LLVM::LLVMPointerType::get(ctx);
+ llvm::SmallVector<mlir::Type> structFields = {llvmPtr, rewriter.getI32Type()};
+ return mlir::LLVM::LLVMStructType::getLiteral(ctx, structFields);
+}
+
+mlir::LogicalResult CIRToLLVMEhInflightOpLowering::matchAndRewrite(
----------------
bcardosolopes wrote:
We need a CIR -> LLVM test here
https://github.com/llvm/llvm-project/pull/165621
More information about the cfe-commits
mailing list