Hello. I’m having problems when defining custom attribute via tablegen. I was using the earlier version of MLIR and after updating MLIR I get the following message (when trying to construct MLIR module):
error: dialect ‘hil’ provides no attribute parsing hook
Attribute definition:
class HIL_Attr<string name, string attrMnemonic, list<Trait> traits = []>
: AttrDef<HIL_Dialect, name, traits> {
let mnemonic = attrMnemonic;
}
def PortAttr : HIL_Attr<"Port", "port"> {
let summary = "Port attribute";
let description = [{
port arg type
}];
let parameters = (ins
"std::string":$name,
"std::string":$typeName,
"Flow":$flow,
"unsigned":$latency,
"unsigned":$isConst,
"unsigned":$value);
let hasCustomAssemblyFormat = 1;
}
I have defined the corresponding print and parse functions for this Attribute and it worked fine in the previous version of MLIR. Am I missing something?