Splits DictionaryAttr into DictionaryAttrBase and DictionaryAttr.

This maintains consistency with other *AttrBase/Attr splits.

PiperOrigin-RevId: 266469869
This commit is contained in:
MLIR Team 2019-08-30 15:40:51 -07:00 committed by A. Unique TensorFlower
parent 6b1d7f51ef
commit 3d3f62323c
1 changed files with 4 additions and 2 deletions

View File

@ -850,13 +850,15 @@ class I64EnumAttr<string name, string description,
//===----------------------------------------------------------------------===//
// Composite attribute kinds
class DictionaryAttr : Attr<CPred<"$_self.isa<DictionaryAttr>()">,
class DictionaryAttrBase : Attr<CPred<"$_self.isa<DictionaryAttr>()">,
"dictionary of named attribute values"> {
let storageType = [{ DictionaryAttr }];
let returnType = [{ DictionaryAttr }];
let convertFromStorage = "$_self";
}
def DictionaryAttr : DictionaryAttrBase;
class ElementsAttrBase<Pred condition, string description> :
Attr<condition, description> {
let storageType = [{ ElementsAttr }];
@ -939,7 +941,7 @@ class StructFieldAttr<string thisName, Attr thisType> {
// validation method and set of accessors for a fixed set of fields. This is
// useful when representing data that would normally be in a structure.
class StructAttr<string name, Dialect dialect,
list<StructFieldAttr> attributes> : DictionaryAttr {
list<StructFieldAttr> attributes> : DictionaryAttrBase {
// Name for this StructAttr.
string className = name;