[PATCH] D114741: Move printNumber method

Jayson Yan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 14:17:08 PST 2021


Jaysonyan created this revision.
Jaysonyan added reviewers: leonardchan, phosek, jhenderson.
Herald added a subscriber: dexonsmith.
Jaysonyan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Move `printNumber(StringRef Label, StringRef Str, T Value)` to be with the rest of the `printNumber(...)` methods.

As mentioned in D114223#inline-1095138 <https://reviews.llvm.org/D114223#inline-1095138>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114741

Files:
  llvm/include/llvm/Support/ScopedPrinter.h


Index: llvm/include/llvm/Support/ScopedPrinter.h
===================================================================
--- llvm/include/llvm/Support/ScopedPrinter.h
+++ llvm/include/llvm/Support/ScopedPrinter.h
@@ -214,6 +214,11 @@
     startLine() << Label << ": " << Value << "\n";
   }
 
+  template <typename T>
+  void printNumber(StringRef Label, StringRef Str, T Value) {
+    printNumberImpl(Label, Str, to_string(Value));
+  }
+
   virtual void printBoolean(StringRef Label, bool Value) {
     startLine() << Label << ": " << (Value ? "Yes" : "No") << '\n';
   }
@@ -268,11 +273,6 @@
     startLine() << Label << ": " << Value << "\n";
   }
 
-  template <typename T>
-  void printNumber(StringRef Label, StringRef Str, T Value) {
-    printNumberImpl(Label, Str, to_string(Value));
-  }
-
   void printBinary(StringRef Label, StringRef Str, ArrayRef<uint8_t> Value) {
     printBinaryImpl(Label, Str, Value, false);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114741.390468.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211129/57ddabb6/attachment.bin>


More information about the llvm-commits mailing list