[llvm] [ADT] Remove StringRef::{startswith,endswith} (PR #89548)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 21 09:04:26 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

These functions have been deprecated since:

  commit 5ac12951b4e9bbfcc5791282d0961ec2b65575e9
  Author: Kazu Hirata <kazu@<!-- -->google.com>
  Date:   Sun Dec 17 15:52:50 2023 -0800


---
Full diff: https://github.com/llvm/llvm-project/pull/89548.diff


1 Files Affected:

- (modified) llvm/include/llvm/ADT/StringRef.h (-10) 


``````````diff
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 1c6c96678b5d27..0360174c5231e5 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -258,11 +258,6 @@ namespace llvm {
       return Length >= Prefix.Length &&
              compareMemory(Data, Prefix.Data, Prefix.Length) == 0;
     }
-    [[nodiscard]] LLVM_DEPRECATED(
-        "Use starts_with instead",
-        "starts_with") bool startswith(StringRef Prefix) const {
-      return starts_with(Prefix);
-    }
 
     /// Check if this string starts with the given \p Prefix, ignoring case.
     [[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
@@ -273,11 +268,6 @@ namespace llvm {
              compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) ==
                  0;
     }
-    [[nodiscard]] LLVM_DEPRECATED(
-        "Use ends_with instead",
-        "ends_with") bool endswith(StringRef Suffix) const {
-      return ends_with(Suffix);
-    }
 
     /// Check if this string ends with the given \p Suffix, ignoring case.
     [[nodiscard]] bool ends_with_insensitive(StringRef Suffix) const;

``````````

</details>


https://github.com/llvm/llvm-project/pull/89548


More information about the llvm-commits mailing list