aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandAlias.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-03-15 01:42:34 +0000
committerEnrico Granata <egranata@apple.com>2016-03-15 01:42:34 +0000
commitdbe8d4f339164ca62fa733bd53c35ca0e9e8c7d6 (patch)
tree634867545d45f2a9506273400914bbe6b105ab10 /lldb/source/Interpreter/CommandAlias.cpp
parent0c5e3af862d9b594fef7609be8388342bdf5de89 (diff)
downloadllvm-dbe8d4f339164ca62fa733bd53c35ca0e9e8c7d6.zip
llvm-dbe8d4f339164ca62fa733bd53c35ca0e9e8c7d6.tar.gz
llvm-dbe8d4f339164ca62fa733bd53c35ca0e9e8c7d6.tar.bz2
Improve the way we decide whether an alias is a dashdash alias
llvm-svn: 263519
Diffstat (limited to 'lldb/source/Interpreter/CommandAlias.cpp')
-rw-r--r--lldb/source/Interpreter/CommandAlias.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandAlias.cpp b/lldb/source/Interpreter/CommandAlias.cpp
index eba5cb5..86308ae 100644
--- a/lldb/source/Interpreter/CommandAlias.cpp
+++ b/lldb/source/Interpreter/CommandAlias.cpp
@@ -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;