MLIR 24.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark Class Reference

Wrapper around an MlirRemark as delivered to a remark callback. More...

#include "mlir/Bindings/Python/IRCore.h"

Public Member Functions

 PyRemark (MlirRemark remark)
void invalidate ()
bool isValid () const
PyRemarkKind getKind () const
nanobind::str getRemarkName () const
nanobind::str getCategoryName () const
nanobind::str getFullCategoryName () const
nanobind::str getFunctionName () const
nanobind::typed< nanobind::object, PyLocation > getLocation () const
uint64_t getId () const
nanobind::list getArgs () const
 The key/value arguments as a list of (key, value) tuples.
nanobind::str getMessage () const
 The textual form of the remark, without its location.

Detailed Description

Wrapper around an MlirRemark as delivered to a remark callback.

Like a PyDiagnostic it is only valid for the duration of the callback; accessing an invalidated remark raises ValueError.

Definition at line 457 of file IRCore.h.

Constructor & Destructor Documentation

◆ PyRemark()

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::PyRemark ( MlirRemark remark)
inlineexplicit

Definition at line 459 of file IRCore.h.

Member Function Documentation

◆ getArgs()

nb::list mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getArgs ( ) const

◆ getCategoryName()

nb::str mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getCategoryName ( ) const

◆ getFullCategoryName()

nb::str mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getFullCategoryName ( ) const

◆ getFunctionName()

nb::str mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getFunctionName ( ) const

◆ getId()

uint64_t mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getId ( ) const

◆ getKind()

PyRemarkKind mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getKind ( ) const

◆ getLocation()

◆ getMessage()

nb::str mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getMessage ( ) const

The textual form of the remark, without its location.

Definition at line 173 of file IRRemarks.cpp.

References MlirStringRef::data, MlirStringRef::length, and mlirRemarkPrint().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRRemarks().

◆ getRemarkName()

nb::str mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::getRemarkName ( ) const

◆ invalidate()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::invalidate ( )
inline

◆ isValid()

bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRemark::isValid ( ) const
inline

The documentation for this class was generated from the following files: