[Lldb-commits] [lldb] a553969 - [lldb] Remove unused AproposAllSubCommands (NFC)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Sun Jan 2 11:30:57 PST 2022
Author: Dave Lee
Date: 2022-01-02T11:30:51-08:00
New Revision: a553969712edeedbaf1b2c8c570869ec43b5dd32
URL: https://github.com/llvm/llvm-project/commit/a553969712edeedbaf1b2c8c570869ec43b5dd32
DIFF: https://github.com/llvm/llvm-project/commit/a553969712edeedbaf1b2c8c570869ec43b5dd32.diff
LOG: [lldb] Remove unused AproposAllSubCommands (NFC)
Added:
Modified:
lldb/include/lldb/Interpreter/CommandObject.h
lldb/include/lldb/Interpreter/CommandObjectMultiword.h
lldb/source/Commands/CommandObjectMultiword.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h
index 89cc161993a9f..bfddf559e5fe9 100644
--- a/lldb/include/lldb/Interpreter/CommandObject.h
+++ b/lldb/include/lldb/Interpreter/CommandObject.h
@@ -172,11 +172,6 @@ class CommandObject {
return nullptr;
}
- virtual void AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) {}
-
void FormatLongHelpText(Stream &output_strm, llvm::StringRef long_help);
void GenerateHelpText(CommandReturnObject &result);
diff --git a/lldb/include/lldb/Interpreter/CommandObjectMultiword.h b/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
index a0e8d163c4b6d..ab580c11eb4fd 100644
--- a/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
+++ b/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
@@ -51,11 +51,6 @@ class CommandObjectMultiword : public CommandObject {
CommandObject *GetSubcommandObject(llvm::StringRef sub_cmd,
StringList *matches = nullptr) override;
- void AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) override;
-
bool WantsRawCommandString() override { return false; }
void HandleCompletion(CompletionRequest &request) override;
@@ -110,11 +105,6 @@ class CommandObjectProxy : public CommandObject {
CommandObject *GetSubcommandObject(llvm::StringRef sub_cmd,
StringList *matches = nullptr) override;
- void AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) override;
-
bool LoadSubCommand(llvm::StringRef cmd_name,
const lldb::CommandObjectSP &command_obj) override;
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index e800bcc12bd36..0629342748aad 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -302,31 +302,6 @@ const char *CommandObjectMultiword::GetRepeatCommand(Args ¤t_command_args,
return sub_command_object->GetRepeatCommand(current_command_args, index);
}
-void CommandObjectMultiword::AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) {
- CommandObject::CommandMap::const_iterator pos;
-
- for (pos = m_subcommand_dict.begin(); pos != m_subcommand_dict.end(); ++pos) {
- const char *command_name = pos->first.c_str();
- CommandObject *sub_cmd_obj = pos->second.get();
- StreamString complete_command_name;
-
- complete_command_name << prefix << " " << command_name;
-
- if (sub_cmd_obj->HelpTextContainsWord(search_word)) {
- commands_found.AppendString(complete_command_name.GetString());
- commands_help.AppendString(sub_cmd_obj->GetHelp());
- }
-
- if (sub_cmd_obj->IsMultiwordObject())
- sub_cmd_obj->AproposAllSubCommands(complete_command_name.GetString(),
- search_word, commands_found,
- commands_help);
- }
-}
-
CommandObjectProxy::CommandObjectProxy(CommandInterpreter &interpreter,
const char *name, const char *help,
const char *syntax, uint32_t flags)
@@ -409,16 +384,6 @@ CommandObject *CommandObjectProxy::GetSubcommandObject(llvm::StringRef sub_cmd,
return nullptr;
}
-void CommandObjectProxy::AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) {
- CommandObject *proxy_command = GetProxyCommandObject();
- if (proxy_command)
- return proxy_command->AproposAllSubCommands(prefix, search_word,
- commands_found, commands_help);
-}
-
bool CommandObjectProxy::LoadSubCommand(
llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_sp) {
CommandObject *proxy_command = GetProxyCommandObject();
More information about the lldb-commits
mailing list