[llvm] 80a0ee6 - [NFC] Move printNumber method

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


Author: Jayson Yan
Date: 2021-12-10T18:57:33Z
New Revision: 80a0ee6f64b9274d51cec80a141f10c627b895f0

URL: https://github.com/llvm/llvm-project/commit/80a0ee6f64b9274d51cec80a141f10c627b895f0
DIFF: https://github.com/llvm/llvm-project/commit/80a0ee6f64b9274d51cec80a141f10c627b895f0.diff

LOG: [NFC] Move printNumber method

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

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D114741

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/ScopedPrinter.h b/llvm/include/llvm/Support/ScopedPrinter.h
index 77d19c676f01..7c4eb2051a70 100644
--- a/llvm/include/llvm/Support/ScopedPrinter.h
+++ b/llvm/include/llvm/Support/ScopedPrinter.h
@@ -222,6 +222,11 @@ class ScopedPrinter {
     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 @@ class ScopedPrinter {
     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);
   }


        


More information about the llvm-commits mailing list