We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89a792e commit ce512b7Copy full SHA for ce512b7
lldb/include/lldb/Interpreter/CommandObject.h
@@ -40,12 +40,11 @@ int AddNamesMatchingPartialString(
40
StringList *descriptions = nullptr) {
41
int number_added = 0;
42
43
- const bool add_all = cmd_str.empty();
44
-
45
- for (auto iter = in_map.begin(), end = in_map.end(); iter != end; iter++) {
46
- if (add_all || (iter->first.find(std::string(cmd_str), 0) == 0)) {
+ for (const auto &iter : in_map) {
+ llvm::StringRef full_cmd = iter->first;
+ if (full_cmd.starts_with(cmd_str)) {
47
++number_added;
48
- matches.AppendString(iter->first.c_str());
+ matches.AppendString(iter->first);
49
if (descriptions)
50
descriptions->AppendString(iter->second->GetHelp());
51
}
0 commit comments