27 : name(name), value(value) {
28 assert(name && value &&
"expected valid attribute name and value");
29 assert(name.size() != 0 &&
"expected valid attribute name");
35 return getName().getReferencedDialect();
39 assert(name &&
"expected valid attribute name");
48 return getName().getValue().compare(rhs) < 0;
Include the generated interface declarations.
static constexpr const bool value
NamedAttribute represents a combination of a name and an Attribute value.
NamedAttribute(StringAttr name, Attribute value)
MLIRContext * getContext() const
Return the context this attribute belongs to.
Attributes are known-constant values of operations.
StringAttr getName() const
Return the name of the attribute.
void setName(StringAttr newName)
Set the name of this attribute.
Dialects are groups of MLIR operations, types and attributes, as well as behavior associated with the...
Dialect * getNameDialect() const
Return the dialect of the name of this attribute, if the name is prefixed by a dialect namespace...
bool operator<(const NamedAttribute &rhs) const
Compare this attribute to the provided attribute, ordering by name.
MLIRContext is the top-level object for a collection of MLIR operations.