[llvm] 1117d80 - [ADT] Deprecate StringRef::{starts, ends}with_insensitive
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 13:18:22 PDT 2023
Author: Kazu Hirata
Date: 2023-06-05T13:18:07-07:00
New Revision: 1117d806ca4d9b5b04263456dcb1ced76ade78cb
URL: https://github.com/llvm/llvm-project/commit/1117d806ca4d9b5b04263456dcb1ced76ade78cb
DIFF: https://github.com/llvm/llvm-project/commit/1117d806ca4d9b5b04263456dcb1ced76ade78cb.diff
LOG: [ADT] Deprecate StringRef::{starts,ends}with_insensitive
This patch deprecates StringRef::{starts,ends}with_insensitive as
their uses have migrated to {starts,ends}_with_insensitive,
respectively.
Differential Revision: https://reviews.llvm.org/D152108
Added:
Modified:
llvm/include/llvm/ADT/StringRef.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 191d3e1281d18..235a7b27c3844 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -264,7 +264,10 @@ namespace llvm {
/// Check if this string starts with the given \p Prefix, ignoring case.
[[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
- [[nodiscard]] bool startswith_insensitive(StringRef Prefix) const {
+ [[nodiscard]] LLVM_DEPRECATED(
+ "Use starts_with_insensitive instead",
+ "starts_with_insensitive") bool startswith_insensitive(StringRef Prefix)
+ const {
return starts_with_insensitive(Prefix);
}
@@ -280,7 +283,10 @@ namespace llvm {
/// Check if this string ends with the given \p Suffix, ignoring case.
[[nodiscard]] bool ends_with_insensitive(StringRef Suffix) const;
- [[nodiscard]] bool endswith_insensitive(StringRef Suffix) const {
+ [[nodiscard]] LLVM_DEPRECATED(
+ "Use ends_with_insensitive instead",
+ "ends_with_insensitive") bool endswith_insensitive(StringRef Suffix)
+ const {
return ends_with_insensitive(Suffix);
}
More information about the llvm-commits
mailing list