[PATCH] D114740: Remove unneeded printString methods

Jayson Yan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 14:05:13 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.

As mentioned in D114223#inline-1095135 <https://reviews.llvm.org/D114223#inline-1095135> both `std::string` and `char *` implicitly convert to `StringRef` so these overloaded methods are not needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114740

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
@@ -268,14 +268,6 @@
     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));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114740.390459.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211129/dd777a91/attachment.bin>


More information about the llvm-commits mailing list