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 Apr 23, 2024
1 parent 34ee77c commit 4ec9a66
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 @@ -258,11 +258,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);
}

/// Check if this string starts with the given \p Prefix, ignoring case.
[[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
Expand All @@ -273,11 +268,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);
}

/// Check if this string ends with the given \p Suffix, ignoring case.
[[nodiscard]] bool ends_with_insensitive(StringRef Suffix) const;
Expand Down

0 comments on commit 4ec9a66

Please sign in to comment.