Skip to content

Commit 2e4a2b8

Browse files
committed
[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
1 parent 9264728 commit 2e4a2b8

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

llvm/include/llvm/ADT/StringRef.h

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ namespace llvm {
195195
return Length == RHS.Length && compare_insensitive(RHS) == 0;
196196
}
197197

198-
LLVM_NODISCARD
199-
bool equals_lower(StringRef RHS) const { return equals_insensitive(RHS); }
200-
201198
/// compare - Compare two strings; the result is -1, 0, or 1 if this string
202199
/// is lexicographically less than, equal to, or greater than the \p RHS.
203200
LLVM_NODISCARD
@@ -216,9 +213,6 @@ namespace llvm {
216213
LLVM_NODISCARD
217214
int compare_insensitive(StringRef RHS) const;
218215

219-
LLVM_NODISCARD
220-
int compare_lower(StringRef RHS) const { return compare_insensitive(RHS); }
221-
222216
/// compare_numeric - Compare two strings, treating sequences of digits as
223217
/// numbers.
224218
LLVM_NODISCARD
@@ -298,11 +292,6 @@ namespace llvm {
298292
LLVM_NODISCARD
299293
bool startswith_insensitive(StringRef Prefix) const;
300294

301-
LLVM_NODISCARD
302-
bool startswith_lower(StringRef Prefix) const {
303-
return startswith_insensitive(Prefix);
304-
}
305-
306295
/// Check if this string ends with the given \p Suffix.
307296
LLVM_NODISCARD
308297
bool endswith(StringRef Suffix) const {
@@ -314,11 +303,6 @@ namespace llvm {
314303
LLVM_NODISCARD
315304
bool endswith_insensitive(StringRef Suffix) const;
316305

317-
LLVM_NODISCARD
318-
bool endswith_lower(StringRef Prefix) const {
319-
return endswith_insensitive(Prefix);
320-
}
321-
322306
/// @}
323307
/// @name String Searching
324308
/// @{
@@ -345,11 +329,6 @@ namespace llvm {
345329
LLVM_NODISCARD
346330
size_t find_insensitive(char C, size_t From = 0) const;
347331

348-
LLVM_NODISCARD
349-
size_t find_lower(char C, size_t From = 0) const {
350-
return find_insensitive(C, From);
351-
}
352-
353332
/// Search for the first character satisfying the predicate \p F
354333
///
355334
/// \returns The index of the first character satisfying \p F starting from
@@ -388,11 +367,6 @@ namespace llvm {
388367
LLVM_NODISCARD
389368
size_t find_insensitive(StringRef Str, size_t From = 0) const;
390369

391-
LLVM_NODISCARD
392-
size_t find_lower(StringRef Str, size_t From = 0) const {
393-
return find_insensitive(Str, From);
394-
}
395-
396370
/// Search for the last character \p C in the string.
397371
///
398372
/// \returns The index of the last occurrence of \p C, or npos if not
@@ -416,11 +390,6 @@ namespace llvm {
416390
LLVM_NODISCARD
417391
size_t rfind_insensitive(char C, size_t From = npos) const;
418392

419-
LLVM_NODISCARD
420-
size_t rfind_lower(char C, size_t From = npos) const {
421-
return rfind_insensitive(C, From);
422-
}
423-
424393
/// Search for the last string \p Str in the string.
425394
///
426395
/// \returns The index of the last occurrence of \p Str, or npos if not
@@ -435,9 +404,6 @@ namespace llvm {
435404
LLVM_NODISCARD
436405
size_t rfind_insensitive(StringRef Str) const;
437406

438-
LLVM_NODISCARD
439-
size_t rfind_lower(StringRef Str) const { return rfind_insensitive(Str); }
440-
441407
/// Find the first character in the string that is \p C, or npos if not
442408
/// found. Same as find.
443409
LLVM_NODISCARD
@@ -507,21 +473,13 @@ namespace llvm {
507473
return find_insensitive(Other) != npos;
508474
}
509475

510-
LLVM_NODISCARD
511-
bool contains_lower(StringRef Other) const {
512-
return contains_insensitive(Other);
513-
}
514-
515476
/// Return true if the given character is contained in *this, and false
516477
/// otherwise.
517478
LLVM_NODISCARD
518479
bool contains_insensitive(char C) const {
519480
return find_insensitive(C) != npos;
520481
}
521482

522-
LLVM_NODISCARD
523-
bool contains_lower(char C) const { return contains_insensitive(C); }
524-
525483
/// @}
526484
/// @name Helpful Algorithms
527485
/// @{
@@ -739,10 +697,6 @@ namespace llvm {
739697
return true;
740698
}
741699

742-
bool consume_front_lower(StringRef Prefix) {
743-
return consume_front_insensitive(Prefix);
744-
}
745-
746700
/// Returns true if this StringRef has the given suffix and removes that
747701
/// suffix.
748702
bool consume_back(StringRef Suffix) {
@@ -763,10 +717,6 @@ namespace llvm {
763717
return true;
764718
}
765719

766-
bool consume_back_lower(StringRef Suffix) {
767-
return consume_back_insensitive(Suffix);
768-
}
769-
770720
/// Return a reference to the substring from [Start, End).
771721
///
772722
/// \param Start The index of the starting character in the substring; if

0 commit comments

Comments
 (0)