Skip to content

Commit 4ec9a66

Browse files
[ADT] Remove StringRef::{startswith,endswith} (#89548)
These functions have been deprecated since: commit 5ac1295 Author: Kazu Hirata <[email protected]> Date: Sun Dec 17 15:52:50 2023 -0800
1 parent 34ee77c commit 4ec9a66

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

llvm/include/llvm/ADT/StringRef.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,6 @@ namespace llvm {
258258
return Length >= Prefix.Length &&
259259
compareMemory(Data, Prefix.Data, Prefix.Length) == 0;
260260
}
261-
[[nodiscard]] LLVM_DEPRECATED(
262-
"Use starts_with instead",
263-
"starts_with") bool startswith(StringRef Prefix) const {
264-
return starts_with(Prefix);
265-
}
266261

267262
/// Check if this string starts with the given \p Prefix, ignoring case.
268263
[[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
@@ -273,11 +268,6 @@ namespace llvm {
273268
compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) ==
274269
0;
275270
}
276-
[[nodiscard]] LLVM_DEPRECATED(
277-
"Use ends_with instead",
278-
"ends_with") bool endswith(StringRef Suffix) const {
279-
return ends_with(Suffix);
280-
}
281271

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

0 commit comments

Comments
 (0)