mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 08:30:34 +08:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user