[llvm] 10602f2 - [NFC] Remove unneeded printString methods

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


Author: Jayson Yan
Date: 2021-12-10T18:57:33Z
New Revision: 10602f2ae1ce663f88c452a199bc036394f3ccbd

URL: https://github.com/llvm/llvm-project/commit/10602f2ae1ce663f88c452a199bc036394f3ccbd
DIFF: https://github.com/llvm/llvm-project/commit/10602f2ae1ce663f88c452a199bc036394f3ccbd.diff

LOG: [NFC] Remove unneeded printString methods

Both std::string and char * implicitly convert to StringRef so
the overloaded method using std::string and char* are unneeded.

Reviewed By: jhenderson

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

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 71d807321c30..77d19c676f01 100644
--- a/llvm/include/llvm/Support/ScopedPrinter.h
+++ b/llvm/include/llvm/Support/ScopedPrinter.h
@@ -327,14 +327,6 @@ class ScopedPrinter {
     startLine() << Label << ": " << Value << "\n";
   }
 
-  void printString(StringRef Label, const std::string &Value) {
-    printString(Label, StringRef(Value));
-  }
-
-  void printString(StringRef Label, const char *Value) {
-    printString(Label, StringRef(Value));
-  }
-
   template <typename T>
   void printNumber(StringRef Label, StringRef Str, T Value) {
     printNumberImpl(Label, Str, to_string(Value));


        


More information about the llvm-commits mailing list