aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-16 14:39:37 -0800
committerKazu Hirata <kazu@google.com>2023-12-16 14:39:37 -0800
commit744f38913fa380580431df0ae89ef5fb3df30240 (patch)
tree538d4e6bc7bf3d7c8d69232316ff89b82e1a2d7a /lldb/source/Commands/CommandObjectThread.cpp
parent01c8af573961c54f0d922c3f3acffa880a0a459c (diff)
downloadllvm-744f38913fa380580431df0ae89ef5fb3df30240.zip
llvm-744f38913fa380580431df0ae89ef5fb3df30240.tar.gz
llvm-744f38913fa380580431df0ae89ef5fb3df30240.tar.bz2
[lldb] Use StringRef::{starts,ends}_with (NFC)
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index dd9fab4..a1e7e3f 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -145,14 +145,14 @@ public:
for (size_t idx = 0; idx < num_entries; idx++) {
llvm::StringRef arg_string = copy_args[idx].ref();
- if (arg_string.equals("-c") || count_opt.startswith(arg_string)) {
+ if (arg_string.equals("-c") || count_opt.starts_with(arg_string)) {
idx++;
if (idx == num_entries)
return std::nullopt;
count_idx = idx;
if (copy_args[idx].ref().getAsInteger(0, count_val))
return std::nullopt;
- } else if (arg_string.equals("-s") || start_opt.startswith(arg_string)) {
+ } else if (arg_string.equals("-s") || start_opt.starts_with(arg_string)) {
idx++;
if (idx == num_entries)
return std::nullopt;
@@ -1575,7 +1575,7 @@ protected:
// I am going to handle this by hand, because I don't want you to have to
// say:
// "thread return -- -5".
- if (command.startswith("-x")) {
+ if (command.starts_with("-x")) {
if (command.size() != 2U)
result.AppendWarning("Return values ignored when returning from user "
"called expressions");