MLIR
19.0.0git
|
Python class mirroring the C MlirDiagnostic struct. More...
#include "Bindings/Python/IRModule.h"
Classes | |
struct | DiagnosticInfo |
Materialized diagnostic information. More... | |
Public Member Functions | |
PyDiagnostic (MlirDiagnostic diagnostic) | |
void | invalidate () |
bool | isValid () |
MlirDiagnosticSeverity | getSeverity () |
PyLocation | getLocation () |
pybind11::str | getMessage () |
pybind11::tuple | getNotes () |
DiagnosticInfo | getInfo () |
Python class mirroring the C MlirDiagnostic struct.
Note that these structs are only valid for the duration of a diagnostic callback and attempting to access them outside of that will raise an exception. This applies to nested diagnostics (in the notes) as well.
Definition at line 341 of file IRModule.h.
|
inline |
Definition at line 343 of file IRModule.h.
Referenced by getNotes().
PyDiagnostic::DiagnosticInfo PyDiagnostic::getInfo | ( | ) |
Definition at line 977 of file IRCore.cpp.
References getInfo(), getLocation(), getMessage(), getNotes(), and getSeverity().
Referenced by getInfo().
PyLocation PyDiagnostic::getLocation | ( | ) |
Definition at line 949 of file IRCore.cpp.
References mlir::python::PyMlirContext::forContext(), mlirDiagnosticGetLocation(), and mlirLocationGetContext().
Referenced by getInfo().
py::str PyDiagnostic::getMessage | ( | ) |
Definition at line 956 of file IRCore.cpp.
References mlir::PyFileAccumulator::getCallback(), mlir::PyFileAccumulator::getUserData(), and mlirDiagnosticPrint().
Referenced by getInfo().
py::tuple PyDiagnostic::getNotes | ( | ) |
Definition at line 964 of file IRCore.cpp.
References mlirDiagnosticGetNote(), mlirDiagnosticGetNumNotes(), and PyDiagnostic().
Referenced by getInfo().
MlirDiagnosticSeverity PyDiagnostic::getSeverity | ( | ) |
Definition at line 944 of file IRCore.cpp.
References mlirDiagnosticGetSeverity().
Referenced by getInfo().
void PyDiagnostic::invalidate | ( | ) |
Definition at line 910 of file IRCore.cpp.
References invalidate().
Referenced by mlir::python::PyMlirContext::attachDiagnosticHandler(), and invalidate().
|
inline |
Definition at line 345 of file IRModule.h.