================ @@ -2646,6 +2646,24 @@ ParseResult cir::InlineAsmOp::parse(OpAsmParser &parser, return mlir::success(); } +//===----------------------------------------------------------------------===// +// ThrowOp +//===----------------------------------------------------------------------===// + +mlir::LogicalResult cir::ThrowOp::verify() { + // For the no-rethrow version, it must have at least the exception pointer. + if (rethrows()) + return success(); + + if (getNumOperands() == 1) { ---------------- andykaylor wrote:
```suggestion if (getNumOperands() != 0) { ``` I don't think this will ever be 1. In fact, maybe we should check for that. We need at least type info and an exception pointer if this isn't a rethrow. When RTTI is implemented, it might be good to add a check to verify that `type_info` references valid type info, and perhaps also that `dtor`, if present, references a destructor. https://github.com/llvm/llvm-project/pull/154994 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits