diff options
author | Enrico Granata <egranata@apple.com> | 2016-03-25 21:59:06 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-03-25 21:59:06 +0000 |
commit | 3c110dd6b40dff4e46b391878112a874e03f12a6 (patch) | |
tree | 1dba0cad68c7a732edaafdea80fc7a1077879e33 /lldb/source/Interpreter/CommandAlias.cpp | |
parent | d0ac31a70694a8bf5604a151afa913b6a51078b9 (diff) | |
download | bcm5719-llvm-3c110dd6b40dff4e46b391878112a874e03f12a6.tar.gz bcm5719-llvm-3c110dd6b40dff4e46b391878112a874e03f12a6.zip |
Fix an issue with nested aliases where the help system wouldn't correctly track the fact that an alias is an alias to a dash-dash alias
(and I hope I typed the word 'alias' enough times in this commit message :-)
llvm-svn: 264468
Diffstat (limited to 'lldb/source/Interpreter/CommandAlias.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandAlias.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandAlias.cpp b/lldb/source/Interpreter/CommandAlias.cpp index f7d8e8e9f1b..a915d63e654 100644 --- a/lldb/source/Interpreter/CommandAlias.cpp +++ b/lldb/source/Interpreter/CommandAlias.cpp @@ -236,11 +236,22 @@ CommandAlias::IsDashDashCommand () break; } } + // if this is a nested alias, it may be adding arguments on top of an already dash-dash alias + if ((m_is_dashdash_alias == eLazyBoolNo) && IsNestedAlias()) + m_is_dashdash_alias = (GetUnderlyingCommand()->IsDashDashCommand() ? eLazyBoolYes : eLazyBoolNo); } } return (m_is_dashdash_alias == eLazyBoolYes); } +bool +CommandAlias::IsNestedAlias () +{ + if (GetUnderlyingCommand()) + return GetUnderlyingCommand()->IsAlias(); + return false; +} + std::pair<lldb::CommandObjectSP, OptionArgVectorSP> CommandAlias::Desugar () { |