: attrs((attrs && !attrs.empty()) ? attrs : nullptr) {}
NamedAttributeList(ArrayRef<NamedAttribute> attributes);
+ bool operator!=(const NamedAttributeList &other) const {
+ return !(*this == other);
+ }
+ bool operator==(const NamedAttributeList &other) const {
+ return attrs == other.attrs;
+ }
+
/// Return the underlying dictionary attribute. This may be null, if this list
/// has no attributes.
DictionaryAttr getDictionary() const { return attrs; }
// - Result Types
// - Operands
return hash_combine(
- op->getName(), op->getAttrs(),
+ op->getName(), op->getAttrList().getDictionary(),
hash_combine_range(op->result_type_begin(), op->result_type_end()),
hash_combine_range(op->operand_begin(), op->operand_end()));
}
lhs->getNumResults() != rhs->getNumResults())
return false;
// Compare attributes.
- if (lhs->getAttrs() != rhs->getAttrs())
+ if (lhs->getAttrList() != rhs->getAttrList())
return false;
// Compare operands.
if (!std::equal(lhs->operand_begin(), lhs->operand_end(),