[llvm] [ADT] Remove StringRef::{startswith,endswith} (PR #89548)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 21 09:03:56 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/89548
These functions have been deprecated since:
commit 5ac12951b4e9bbfcc5791282d0961ec2b65575e9
Author: Kazu Hirata <kazu at google.com>
Date: Sun Dec 17 15:52:50 2023 -0800
>From 023844dbc3102109691a03e1f85d56e77e094c1c Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Mon, 29 Jan 2024 09:14:24 -0800
Subject: [PATCH] [ADT] Remove StringRef::{startswith,endswith}
These functions have been deprecated since:
commit 5ac12951b4e9bbfcc5791282d0961ec2b65575e9
Author: Kazu Hirata <kazu at google.com>
Date: Sun Dec 17 15:52:50 2023 -0800
---
llvm/include/llvm/ADT/StringRef.h | 10 ----------
1 file changed, 10 deletions(-)
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;
More information about the llvm-commits
mailing list