forked from OSchip/llvm-project
Splits DictionaryAttr into DictionaryAttrBase and DictionaryAttr.
This maintains consistency with other *AttrBase/Attr splits. PiperOrigin-RevId: 266469869
This commit is contained in:
parent
6b1d7f51ef
commit
3d3f62323c
|
@ -850,13 +850,15 @@ class I64EnumAttr<string name, string description,
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Composite attribute kinds
|
// Composite attribute kinds
|
||||||
|
|
||||||
class DictionaryAttr : Attr<CPred<"$_self.isa<DictionaryAttr>()">,
|
class DictionaryAttrBase : Attr<CPred<"$_self.isa<DictionaryAttr>()">,
|
||||||
"dictionary of named attribute values"> {
|
"dictionary of named attribute values"> {
|
||||||
let storageType = [{ DictionaryAttr }];
|
let storageType = [{ DictionaryAttr }];
|
||||||
let returnType = [{ DictionaryAttr }];
|
let returnType = [{ DictionaryAttr }];
|
||||||
let convertFromStorage = "$_self";
|
let convertFromStorage = "$_self";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def DictionaryAttr : DictionaryAttrBase;
|
||||||
|
|
||||||
class ElementsAttrBase<Pred condition, string description> :
|
class ElementsAttrBase<Pred condition, string description> :
|
||||||
Attr<condition, description> {
|
Attr<condition, description> {
|
||||||
let storageType = [{ ElementsAttr }];
|
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
|
// 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.
|
// useful when representing data that would normally be in a structure.
|
||||||
class StructAttr<string name, Dialect dialect,
|
class StructAttr<string name, Dialect dialect,
|
||||||
list<StructFieldAttr> attributes> : DictionaryAttr {
|
list<StructFieldAttr> attributes> : DictionaryAttrBase {
|
||||||
// Name for this StructAttr.
|
// Name for this StructAttr.
|
||||||
string className = name;
|
string className = name;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue