|
MLIR 22.0.0git
|
Represents a Python MlirNamedAttr, carrying an optional owned name. More...
#include "Bindings/Python/IRModule.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.
Definition at line 1034 of file IRModule.h.
| 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 2057 of file IRCore.cpp.
References mlirAttributeGetContext(), mlirIdentifierGet(), mlirNamedAttributeGet(), namedAttr, and toMlirStringRef().
| MlirNamedAttribute mlir::python::PyNamedAttribute::namedAttr |
Definition at line 1043 of file IRModule.h.
Referenced by PyNamedAttribute().