summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp9
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index 887ce24765f..ae19976b822 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -367,6 +367,15 @@ CommandObjectProxy::IsMultiwordObject ()
return false;
}
+CommandObjectMultiword*
+CommandObjectProxy::GetAsMultiwordCommand ()
+{
+ CommandObject *proxy_command = GetProxyCommandObject();
+ if (proxy_command)
+ return proxy_command->GetAsMultiwordCommand();
+ return nullptr;
+}
+
void
CommandObjectProxy::GenerateHelpText (Stream &result)
{
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 064a95f95b2..b28c44a5272 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2806,7 +2806,7 @@ CommandInterpreter::FindCommandsForApropos (const char *search_word,
if (cmd_obj->IsMultiwordObject())
{
- CommandObjectMultiword *cmd_multiword = (CommandObjectMultiword*)cmd_obj;
+ CommandObjectMultiword *cmd_multiword = cmd_obj->GetAsMultiwordCommand();
FindCommandsForApropos(search_word,
commands_found,
commands_help,
OpenPOWER on IntegriCloud