[mlir] Better error message in PybindAdaptors.h
When attempting to cast a pybind11 handle to an MLIR C API object through capsules, the binding code would attempt to directly access the "_CAPIPtr" attribute on the object, leading to a rather obscure AttributeError when the attribute was missing, e.g., on non-MLIR types. Check for its presence and throw a TypeError instead. Depends On D117646 Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D117658
Loading
Please sign in to comment