[PATCH] D79377: Remove tabs from predecessor comments

Geoffrey Martin-Noble via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 16:41:49 PDT 2020


GMNGeoffrey created this revision.
GMNGeoffrey added a reviewer: rriddle.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, mehdi_amini.
Herald added 1 blocking reviewer(s): rriddle.
Herald added a project: LLVM.

This change removes tabs from the comments printed by the asmprinter after basic
block declarations in favor of two spaces. This is currently the only place in
the printed IR that uses tabs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79377

Files:
  mlir/lib/IR/AsmPrinter.cpp


Index: mlir/lib/IR/AsmPrinter.cpp
===================================================================
--- mlir/lib/IR/AsmPrinter.cpp
+++ mlir/lib/IR/AsmPrinter.cpp
@@ -2302,11 +2302,11 @@
 
     // Print out some context information about the predecessors of this block.
     if (!block->getParent()) {
-      os << "\t// block is not in a region!";
+      os << "  // block is not in a region!";
     } else if (block->hasNoPredecessors()) {
-      os << "\t// no predecessors";
+      os << "  // no predecessors";
     } else if (auto *pred = block->getSinglePredecessor()) {
-      os << "\t// pred: ";
+      os << "  // pred: ";
       printBlockName(pred);
     } else {
       // We want to print the predecessors in increasing numeric order, not in
@@ -2316,7 +2316,7 @@
         predIDs.push_back({state->getSSANameState().getBlockID(pred), pred});
       llvm::array_pod_sort(predIDs.begin(), predIDs.end());
 
-      os << "\t// " << predIDs.size() << " preds: ";
+      os << "  // " << predIDs.size() << " preds: ";
 
       interleaveComma(predIDs, [&](std::pair<unsigned, Block *> pred) {
         printBlockName(pred.second);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79377.261961.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200504/f0155995/attachment.bin>


More information about the llvm-commits mailing list