[llvm] 2e4a2b8 - [ADT] Complete the StringRef case insensitive method renaming
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 24 14:23:41 PDT 2021
Author: Martin Storsjö
Date: 2021-06-25T00:22:02+03:00
New Revision: 2e4a2b8430aca6f7aef8100a5ff81ca0328d03f9
URL: https://github.com/llvm/llvm-project/commit/2e4a2b8430aca6f7aef8100a5ff81ca0328d03f9
DIFF: https://github.com/llvm/llvm-project/commit/2e4a2b8430aca6f7aef8100a5ff81ca0328d03f9.diff
LOG: [ADT] Complete the StringRef case insensitive method renaming
Remove the old name for the methods. These were only left behind to
ease the transition for downstreams.
Differential Revision: https://reviews.llvm.org/D104820
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 493f26adbb5d..17e64f7f81bb 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -195,9 +195,6 @@ namespace llvm {
return Length == RHS.Length && compare_insensitive(RHS) == 0;
}
- LLVM_NODISCARD
- bool equals_lower(StringRef RHS) const { return equals_insensitive(RHS); }
-
/// compare - Compare two strings; the result is -1, 0, or 1 if this string
/// is lexicographically less than, equal to, or greater than the \p RHS.
LLVM_NODISCARD
@@ -216,9 +213,6 @@ namespace llvm {
LLVM_NODISCARD
int compare_insensitive(StringRef RHS) const;
- LLVM_NODISCARD
- int compare_lower(StringRef RHS) const { return compare_insensitive(RHS); }
-
/// compare_numeric - Compare two strings, treating sequences of digits as
/// numbers.
LLVM_NODISCARD
@@ -298,11 +292,6 @@ namespace llvm {
LLVM_NODISCARD
bool startswith_insensitive(StringRef Prefix) const;
- LLVM_NODISCARD
- bool startswith_lower(StringRef Prefix) const {
- return startswith_insensitive(Prefix);
- }
-
/// Check if this string ends with the given \p Suffix.
LLVM_NODISCARD
bool endswith(StringRef Suffix) const {
@@ -314,11 +303,6 @@ namespace llvm {
LLVM_NODISCARD
bool endswith_insensitive(StringRef Suffix) const;
- LLVM_NODISCARD
- bool endswith_lower(StringRef Prefix) const {
- return endswith_insensitive(Prefix);
- }
-
/// @}
/// @name String Searching
/// @{
@@ -345,11 +329,6 @@ namespace llvm {
LLVM_NODISCARD
size_t find_insensitive(char C, size_t From = 0) const;
- LLVM_NODISCARD
- size_t find_lower(char C, size_t From = 0) const {
- return find_insensitive(C, From);
- }
-
/// Search for the first character satisfying the predicate \p F
///
/// \returns The index of the first character satisfying \p F starting from
@@ -388,11 +367,6 @@ namespace llvm {
LLVM_NODISCARD
size_t find_insensitive(StringRef Str, size_t From = 0) const;
- LLVM_NODISCARD
- size_t find_lower(StringRef Str, size_t From = 0) const {
- return find_insensitive(Str, From);
- }
-
/// Search for the last character \p C in the string.
///
/// \returns The index of the last occurrence of \p C, or npos if not
@@ -416,11 +390,6 @@ namespace llvm {
LLVM_NODISCARD
size_t rfind_insensitive(char C, size_t From = npos) const;
- LLVM_NODISCARD
- size_t rfind_lower(char C, size_t From = npos) const {
- return rfind_insensitive(C, From);
- }
-
/// Search for the last string \p Str in the string.
///
/// \returns The index of the last occurrence of \p Str, or npos if not
@@ -435,9 +404,6 @@ namespace llvm {
LLVM_NODISCARD
size_t rfind_insensitive(StringRef Str) const;
- LLVM_NODISCARD
- size_t rfind_lower(StringRef Str) const { return rfind_insensitive(Str); }
-
/// Find the first character in the string that is \p C, or npos if not
/// found. Same as find.
LLVM_NODISCARD
@@ -507,11 +473,6 @@ namespace llvm {
return find_insensitive(Other) != npos;
}
- LLVM_NODISCARD
- bool contains_lower(StringRef Other) const {
- return contains_insensitive(Other);
- }
-
/// Return true if the given character is contained in *this, and false
/// otherwise.
LLVM_NODISCARD
@@ -519,9 +480,6 @@ namespace llvm {
return find_insensitive(C) != npos;
}
- LLVM_NODISCARD
- bool contains_lower(char C) const { return contains_insensitive(C); }
-
/// @}
/// @name Helpful Algorithms
/// @{
@@ -739,10 +697,6 @@ namespace llvm {
return true;
}
- bool consume_front_lower(StringRef Prefix) {
- return consume_front_insensitive(Prefix);
- }
-
/// Returns true if this StringRef has the given suffix and removes that
/// suffix.
bool consume_back(StringRef Suffix) {
@@ -763,10 +717,6 @@ namespace llvm {
return true;
}
- bool consume_back_lower(StringRef Suffix) {
- return consume_back_insensitive(Suffix);
- }
-
/// Return a reference to the substring from [Start, End).
///
/// \param Start The index of the starting character in the substring; if
More information about the llvm-commits
mailing list