================
@@ -3418,6 +3418,20 @@ mlir::LogicalResult
CIRToLLVMEhInflightOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMEhTypeIdOpLowering::matchAndRewrite(
+ cir::EhTypeIdOp op, OpAdaptor adaptor,
+ mlir::ConversionPatternRewriter &rewriter) const {
+ mlir::Value addrOp = mlir::LLVM::AddressOfOp::create(
+ rewriter, op.getLoc(),
+ mlir::LLVM::LLVMPointerType::get(rewriter.getContext()),
+ op.getTypeSymAttr());
+ mlir::LLVM::CallIntrinsicOp newOp = createCallLLVMIntrinsicOp(
+ rewriter, op.getLoc(), "llvm.eh.typeid.for.p0", rewriter.getI32Type(),
----------------
andykaylor wrote:
The LLVM dialect has a dedicated operation for this. We should lower to that
instead of calling the intrinsic directly.
https://github.com/llvm/llvm-project/pull/172558
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits