[PATCH] D78384: [mlir] omit extra newlines if there are no aliases

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 10:14:57 PDT 2020


rriddle accepted this revision.
rriddle added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/IR/AsmPrinter.cpp:384
     auto &aliasAttrsPair = kindAlias.second;
-    for (unsigned i = 0, e = aliasAttrsPair.second.size(); i != e; ++i)
-      printAlias(aliasAttrsPair.first, aliasAttrsPair.second[i], i);
-    os << newLine;
+    unsigned size = aliasAttrsPair.second.size();
+    if (size > 0) {
----------------
nit:
```
if (aliasAttrsPair.second.empty())
  continue;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78384/new/

https://reviews.llvm.org/D78384





More information about the llvm-commits mailing list