[PATCH] D102599: [ADT] Remove StringRef::withNullAsEmpty

Raphael Isemann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 06:45:45 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG82f248d234a3: [ADT] Remove StringRef::withNullAsEmpty (authored by teemperor).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102599

Files:
  llvm/include/llvm/ADT/StringRef.h


Index: llvm/include/llvm/ADT/StringRef.h
===================================================================
--- llvm/include/llvm/ADT/StringRef.h
+++ llvm/include/llvm/ADT/StringRef.h
@@ -120,10 +120,6 @@
         : Data(Str.data()), Length(Str.size()) {}
 #endif
 
-    static StringRef withNullAsEmpty(const char *data) {
-      return StringRef(data ? data : "");
-    }
-
     /// @}
     /// @name Iterators
     /// @{


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102599.346163.patch
Type: text/x-patch
Size: 426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210518/63f3c9b4/attachment.bin>


More information about the llvm-commits mailing list