[Mlir-commits] [mlir] [mlir] Remove extra whitespace during printout in prop-dict (#145695) (PR #145908)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 26 07:52:45 PDT 2025


https://github.com/weirdsmiley created https://github.com/llvm/llvm-project/pull/145908

Using character representation and removal of extra whitespace keeps printout consistent across cases.

>From d68e1fc1a350dd4dc630f52989090e3324ca88f4 Mon Sep 17 00:00:00 2001
From: Manas <manas18244 at iiitd.ac.in>
Date: Thu, 26 Jun 2025 20:20:59 +0530
Subject: [PATCH] [mlir] Remove extra whitespace during printout in prop-dict
 (#145695)

Using character representation and removal of extra whitespace keeps
printout consistent across cases.
---
 mlir/lib/IR/AsmPrinter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index c7cc6a02ad208..d9bd6444dda79 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -2848,7 +2848,7 @@ void AsmPrinter::Impl::printOptionalAttrDict(ArrayRef<NamedAttribute> attrs,
       os << " attributes";
 
     // Otherwise, print them all out in braces.
-    os << " {";
+    os << '{';
     interleaveComma(filteredAttrs,
                     [&](NamedAttribute attr) { printNamedAttribute(attr); });
     os << '}';



More information about the Mlir-commits mailing list