1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

[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
This commit is contained in:
Martin Storsjö 2021-06-23 23:22:25 +03:00
parent 9d14adb9f6
commit 1d9cb8abdf

View File

@ -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