[lldb] Use StringRef::starts_with (NFC)

This patch replaces uses of StringRef::startswith with
StringRef::starts_with for consistency with
std::{string,string_view}::starts_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
This commit is contained in:
Kazu Hirata 2023-12-17 15:51:48 -08:00
parent 211f5d00e2
commit 364d7e775f

View File

@ -110,7 +110,7 @@ AND call SWIG_fail at the same time, because it will result in a double free.
SWIG_fail;
}
if (llvm::StringRef(type_name.get()).startswith("SB")) {
if (llvm::StringRef(type_name.get()).starts_with("SB")) {
std::string error_msg = "Input type is invalid: " + type_name.get();
PyErr_SetString(PyExc_TypeError, error_msg.c_str());
SWIG_fail;