Skip to content

Commit 9877091

Browse files
authored
Fix build error. (#13530)
Revert 4ec9a66 since vc-intrinsics-src is still using deprecated api.
1 parent 99bc647 commit 9877091

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/include/llvm/ADT/StringRef.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ 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+
}
261266

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

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

0 commit comments

Comments
 (0)