diff options
author | Enrico Granata <egranata@apple.com> | 2016-03-14 22:17:04 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-03-14 22:17:04 +0000 |
commit | bef55ac8f54fc62369af35483ab69f8d0676050d (patch) | |
tree | d24412b18a03908157a952f88e036903cb5db705 /lldb/source/Commands/CommandObjectHelp.cpp | |
parent | 2414c5d46be6de849cdba1b048f3e7096cb578f1 (diff) | |
download | llvm-bef55ac8f54fc62369af35483ab69f8d0676050d.zip llvm-bef55ac8f54fc62369af35483ab69f8d0676050d.tar.gz llvm-bef55ac8f54fc62369af35483ab69f8d0676050d.tar.bz2 |
Lots of progress on the CommandAlias refactoring
This cleans things up such CommandAlias essentially can work as its own object; the aliases still live in a separate map, but are now just full-fledged CommandObjectSPs
This patch also cleans up help generation for aliases, allows aliases to vend their own help, and adds a tweak such that "dash-dash aliases", such as po, don't show the list of options for their underlying command, since those can't be provided anyway
I plan to fix up a few more things here, and then add a test case and proclaim victory
llvm-svn: 263499
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index d84de54..71f2800 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -128,6 +128,8 @@ CommandObjectHelp::DoExecute (Args& command, CommandReturnObject &result) { sub_command = command.GetArgumentAtIndex(i); matches.Clear(); + if (sub_cmd_obj->IsAlias()) + sub_cmd_obj = ((CommandAlias*)sub_cmd_obj)->GetUnderlyingCommand().get(); if (! sub_cmd_obj->IsMultiwordObject ()) { all_okay = false; |