diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h index 4e69d5b633546d..d892333de391ce 100644 --- a/llvm/include/llvm/ADT/StringRef.h +++ b/llvm/include/llvm/ADT/StringRef.h @@ -258,7 +258,9 @@ namespace llvm { return Length >= Prefix.Length && compareMemory(Data, Prefix.Data, Prefix.Length) == 0; } - [[nodiscard]] bool startswith(StringRef Prefix) const { + [[nodiscard]] LLVM_DEPRECATED( + "Use starts_with instead", + "starts_with") bool startswith(StringRef Prefix) const { return starts_with(Prefix); } @@ -271,7 +273,9 @@ namespace llvm { compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) == 0; } - [[nodiscard]] bool endswith(StringRef Suffix) const { + [[nodiscard]] LLVM_DEPRECATED( + "Use ends_with instead", + "ends_with") bool endswith(StringRef Suffix) const { return ends_with(Suffix); }