22 walkImmediateSubElementsFn(attr, walkAttrsFn, walkTypesFn);
29 return replaceImmediateSubElementsFn(attr, replAttrs, replTypes);
44 : name(name), value(value) {
45 assert(name && value &&
"expected valid attribute name and value");
46 assert(!name.empty() &&
"expected valid attribute name");
50 return llvm::cast<StringAttr>(name);
54 return getName().getReferencedDialect();
58 assert(name &&
"expected valid attribute name");
67 return getName().getValue().compare(rhs) < 0;
void walkImmediateSubElements(Attribute attr, function_ref< void(Attribute)> walkAttrsFn, function_ref< void(Type)> walkTypesFn) const
Walk the immediate sub-elements of this attribute.
Attribute replaceImmediateSubElements(Attribute attr, ArrayRef< Attribute > replAttrs, ArrayRef< Type > replTypes) const
Replace the immediate sub-elements of this attribute.
Attributes are known-constant values of operations.
MLIRContext * getContext() const
Return the context this attribute belongs to.
Dialects are groups of MLIR operations, types and attributes, as well as behavior associated with the...
MLIRContext is the top-level object for a collection of MLIR operations.
NamedAttribute represents a combination of a name and an Attribute value.
StringAttr getName() const
Return the name of the attribute.
void setName(StringAttr newName)
Set the name of this attribute.
bool operator<(const NamedAttribute &rhs) const
Compare this attribute to the provided attribute, ordering by name.
NamedAttribute(StringAttr name, Attribute value)
Dialect * getNameDialect() const
Return the dialect of the name of this attribute, if the name is prefixed by a dialect namespace.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Include the generated interface declarations.