|
MLIR 23.0.0git
|
CRTP base class for Python classes that subclass Location and should be castable from it (i.e. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Types | |
| using | ClassTy = nanobind::class_<DerivedTy, BaseTy> |
| using | IsAFunctionTy = bool (*)(MlirLocation) |
| using | GetTypeIDFunctionTy = MlirTypeID (*)() |
| using | Base = PyConcreteLocation |
Public Member Functions | |
| PyConcreteLocation ()=default | |
| PyConcreteLocation (PyMlirContextRef contextRef, MlirLocation loc) | |
| PyConcreteLocation (PyLocation &orig) | |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation | |
| PyLocation (PyMlirContextRef contextRef, MlirLocation loc) | |
| operator MlirLocation () const | |
| MlirLocation | get () const |
| void | contextExit (const nanobind::object &excType, const nanobind::object &excVal, const nanobind::object &excTb) |
| nanobind::object | getCapsule () |
| Gets a capsule wrapping the void* within the MlirLocation. | |
| nanobind::typed< nanobind::object, PyLocation > | maybeDownCast () |
| Returns the most-derived Location subclass registered for this TypeID, or self. | |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject | |
| BaseContextObject (PyMlirContextRef ref) | |
| PyMlirContextRef & | getContext () |
| Accesses the context reference. | |
Static Public Member Functions | |
| static MlirLocation | castFrom (PyLocation &orig) |
| static void | bind (nanobind::module_ &m) |
| static void | bindDerived (ClassTy &m) |
| Implemented by derived classes to add methods to the Python subclass. | |
| Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation | |
| static nanobind::object | contextEnter (nanobind::object location) |
| Enter and exit the context manager. | |
| static PyLocation | createFromCapsule (nanobind::object capsule) |
| Creates a PyLocation from the MlirLocation wrapped by a capsule. | |
Static Public Attributes | |
| static constexpr GetTypeIDFunctionTy | getTypeIdFunction = nullptr |
CRTP base class for Python classes that subclass Location and should be castable from it (i.e.
via something like FileLineColLoc(loc)).
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::Base = PyConcreteLocation |
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::ClassTy = nanobind::class_<DerivedTy, BaseTy> |
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::GetTypeIDFunctionTy = MlirTypeID (*)() |
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::IsAFunctionTy = bool (*)(MlirLocation) |
|
default |
Referenced by PyConcreteLocation().
|
inline |
|
inline |
Definition at line 1188 of file IRCore.h.
References castFrom(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::getContext(), PyConcreteLocation(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::PyLocation().
|
inlinestatic |
Definition at line 1203 of file IRCore.h.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyGlobals::get(), mlir::PyPrintAccumulator::getCallback(), mlir::PyPrintAccumulator::getUserData(), mlir::PyPrintAccumulator::join(), mlirLocationPrint(), mlir::PyPrintAccumulator::parts, and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::PyLocation().
|
inlinestatic |
|
inlinestatic |
Definition at line 1191 of file IRCore.h.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::get(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::PyLocation().
Referenced by PyConcreteLocation().
|
staticconstexpr |