Skip to content

Commit 364d7e7

Browse files
[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.
1 parent 211f5d0 commit 364d7e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/bindings/python/python-typemaps.swig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ AND call SWIG_fail at the same time, because it will result in a double free.
110110
SWIG_fail;
111111
}
112112

113-
if (llvm::StringRef(type_name.get()).startswith("SB")) {
113+
if (llvm::StringRef(type_name.get()).starts_with("SB")) {
114114
std::string error_msg = "Input type is invalid: " + type_name.get();
115115
PyErr_SetString(PyExc_TypeError, error_msg.c_str());
116116
SWIG_fail;

0 commit comments

Comments
 (0)