|
MLIR 22.0.0git
|
Represents a Python MlirNamedAttr, carrying an optional owned name. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyNamedAttribute (MlirAttribute attr, std::string ownedName) | |
| Constructs a PyNamedAttr that retains an owned name. | |
Public Attributes | |
| MlirNamedAttribute | namedAttr |
Represents a Python MlirNamedAttr, carrying an optional owned name.
TODO: Refactor this and the C-API to be based on an Identifier owned by the context so as to avoid ownership issues here.
| mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyNamedAttribute::PyNamedAttribute | ( | MlirAttribute | attr, |
| std::string | ownedName ) |
Constructs a PyNamedAttr that retains an owned name.
This should be used in any code that originates an MlirNamedAttribute from a python string. The lifetime of the PyNamedAttr must extend to the lifetime of the passed attribute.
Definition at line 1933 of file IRCore.cpp.
References mlirAttributeGetContext(), mlirIdentifierGet(), mlirNamedAttributeGet(), namedAttr, and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef().
| MlirNamedAttribute mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyNamedAttribute::namedAttr |
Definition at line 1044 of file IRCore.h.
Referenced by PyNamedAttribute().