diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Interpreter/Options.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Interpreter/Options.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm-project/lldb/source/Interpreter/Options.cpp b/contrib/llvm-project/lldb/source/Interpreter/Options.cpp index acbde7660440..89fe69009d90 100644 --- a/contrib/llvm-project/lldb/source/Interpreter/Options.cpp +++ b/contrib/llvm-project/lldb/source/Interpreter/Options.cpp @@ -636,7 +636,7 @@ bool Options::HandleOptionCompletion(CompletionRequest &request, // upper level code will know this is a full match and add the " ". const OptionDefinition &opt = opt_defs[opt_defs_index]; llvm::StringRef long_option = opt.long_option; - if (cur_opt_str.startswith("--") && cur_opt_str != long_option) { + if (cur_opt_str.starts_with("--") && cur_opt_str != long_option) { request.AddCompletion("--" + long_option.str(), opt.usage_text); return true; } else @@ -652,7 +652,7 @@ bool Options::HandleOptionCompletion(CompletionRequest &request, if (cur_opt_str.consume_front("--")) { for (auto &def : opt_defs) { llvm::StringRef long_option(def.long_option); - if (long_option.startswith(cur_opt_str)) + if (long_option.starts_with(cur_opt_str)) request.AddCompletion("--" + long_option.str(), def.usage_text); } } @@ -890,8 +890,8 @@ static size_t FindArgumentIndexForOption(const Args &args, std::string long_opt = std::string(llvm::formatv("--{0}", long_option.definition->long_option)); for (const auto &entry : llvm::enumerate(args)) { - if (entry.value().ref().startswith(short_opt) || - entry.value().ref().startswith(long_opt)) + if (entry.value().ref().starts_with(short_opt) || + entry.value().ref().starts_with(long_opt)) return entry.index(); } |
