From a2b0a8e83b68ed75bd79ebc959acdac32f1588bf Mon Sep 17 00:00:00 2001 From: BuyunXu Date: Tue, 9 Jul 2024 11:21:35 +0800 Subject: [PATCH] [Moore] Replace implementation of printing optional attributes --- lib/Dialect/Moore/MooreOps.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Dialect/Moore/MooreOps.cpp b/lib/Dialect/Moore/MooreOps.cpp index ec1e1e2d8af0..8ae89bb5f893 100644 --- a/lib/Dialect/Moore/MooreOps.cpp +++ b/lib/Dialect/Moore/MooreOps.cpp @@ -48,9 +48,8 @@ void SVModuleOp::print(OpAsmPrinter &p) { p.printRegion(getBodyRegion(), /*printEntryBlockArgs=*/false, /*printBlockTerminators=*/true); - SmallVector omittedAttrs = {"sym_name", "module_type", - visibilityAttrName}; - p.printOptionalAttrDictWithKeyword((*this)->getAttrs(), omittedAttrs); + p.printOptionalAttrDictWithKeyword(getOperation()->getAttrs(), + getAttributeNames()); } ParseResult SVModuleOp::parse(OpAsmParser &parser, OperationState &result) {