Skip to content

Commit

Permalink
[ADT] Remove StringRef::{startswith,endswith} (#89548) (#15983)
Browse files Browse the repository at this point in the history
These functions have been deprecated since:

  commit 5ac1295
  Author: Kazu Hirata <[email protected]>
  Date:   Sun Dec 17 15:52:50 2023 -0800

Co-authored-by: Kazu Hirata <[email protected]>
  • Loading branch information
haonanya1 and kazutakahirata authored Nov 22, 2024
1 parent 795ff19 commit db59b4f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions llvm/include/llvm/ADT/StringRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,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);
}
[[nodiscard]] bool starts_with(char Prefix) const {
return !empty() && front() == Prefix;
}
Expand All @@ -281,11 +276,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);
}
[[nodiscard]] bool ends_with(char Suffix) const {
return !empty() && back() == Suffix;
}
Expand Down

0 comments on commit db59b4f

Please sign in to comment.