[Mlir-commits] [mlir] [mlir] Add the ability to override attribute parsing/printing in attr-dicts (PR #103304)
Benjamin Maxwell
llvmlistbot at llvm.org
Wed Aug 14 01:13:38 PDT 2024
================
@@ -780,9 +783,10 @@ class DummyAliasOperationPrinter : private OpAsmPrinter {
/// Print the given set of attributes with names not included within
/// 'elidedAttrs'.
void printOptionalAttrDict(ArrayRef<NamedAttribute> attrs,
- ArrayRef<StringRef> elidedAttrs = {}) override {
- if (attrs.empty())
- return;
+ ArrayRef<StringRef> elidedAttrs = {},
+ function_ref<LogicalResult(NamedAttribute)>
+ printNamedAttrFn = nullptr) override {
+ (void)printNamedAttrFn;
----------------
MacDue wrote:
This is the DummyAliasOperationPrinter. It does not actually print anything, just tracks what would be printed (e.g. which attributes). A custom print style would not change that.
https://github.com/llvm/llvm-project/pull/103304
More information about the Mlir-commits
mailing list