forked from OSchip/llvm-project
[mlir][OpDefGen] Don't emit attribute name getters when there are no attributes
This avoids generating otherwise unnecessary methods.
This commit is contained in:
parent
72d4cd627c
commit
c43e8c0eef
|
@ -669,6 +669,8 @@ void OpEmitter::genAttrNameGetters() {
|
|||
body << "};\n return ::llvm::makeArrayRef(attrNames);";
|
||||
}
|
||||
}
|
||||
if (attributeNames.empty())
|
||||
return;
|
||||
|
||||
// Emit the getAttributeNameForIndex methods.
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue