[PATCH] D114741: Move printNumber method

Jayson Yan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 10:58:18 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG80a0ee6f64b9: [NFC] Move printNumber method (authored by Jaysonyan).

Repository:
  rG LLVM Github Monorepo

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

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
@@ -222,6 +222,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';
   }
@@ -327,11 +332,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.393541.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211210/c49d2ea6/attachment.bin>


More information about the llvm-commits mailing list