Skip to content

Commit

Permalink
[ADT] Remove StringRef::{startswith,endswith} (#89548)
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
  • Loading branch information
kazutakahirata authored and haonanya1 committed Nov 5, 2024
1 parent 4a274fc commit 06f7e5b
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 06f7e5b

Please sign in to comment.