summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectVersion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectVersion.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectVersion.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectVersion.cpp b/lldb/source/Commands/CommandObjectVersion.cpp
index ea1930e0ffd..2d950a89c9b 100644
--- a/lldb/source/Commands/CommandObjectVersion.cpp
+++ b/lldb/source/Commands/CommandObjectVersion.cpp
@@ -38,8 +38,16 @@ CommandObjectVersion::~CommandObjectVersion ()
bool
CommandObjectVersion::DoExecute (Args& args, CommandReturnObject &result)
{
- result.AppendMessageWithFormat ("%s\n", lldb_private::GetVersion());
- result.SetStatus (eReturnStatusSuccessFinishResult);
+ if (args.GetArgumentCount() == 0)
+ {
+ result.AppendMessageWithFormat ("%s\n", lldb_private::GetVersion());
+ result.SetStatus (eReturnStatusSuccessFinishResult);
+ }
+ else
+ {
+ result.AppendError("the version command takes no arguments.");
+ result.SetStatus (eReturnStatusFailed);
+ }
return true;
}
OpenPOWER on IntegriCloud