[Lldb-commits] [lldb] r263519 - Improve the way we decide whether an alias is a dashdash alias

Enrico Granata via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 14 18:42:35 PDT 2016


Author: enrico
Date: Mon Mar 14 20:42:34 2016
New Revision: 263519

URL: http://llvm.org/viewvc/llvm-project?rev=263519&view=rev
Log:
Improve the way we decide whether an alias is a dashdash alias


Modified:
    lldb/trunk/source/Interpreter/CommandAlias.cpp

Modified: lldb/trunk/source/Interpreter/CommandAlias.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandAlias.cpp?rev=263519&r1=263518&r2=263519&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandAlias.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandAlias.cpp Mon Mar 14 20:42:34 2016
@@ -226,7 +226,8 @@ CommandAlias::IsDashDashCommand ()
             for (const OptionArgPair& opt_arg : *GetOptionArguments())
             {
                 if (opt_arg.first == "<argument>" &&
-                    opt_arg.second.second == " --")
+                    !opt_arg.second.second.empty() &&
+                    llvm::StringRef(opt_arg.second.second).endswith("--"))
                 {
                     m_is_dashdash_alias = eLazyBoolYes;
                     break;




More information about the lldb-commits mailing list