1 //===-- CommandObjectVersion.cpp --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lldb/lldb-python.h"
12 #include "CommandObjectVersion.h"
16 // Other libraries and framework includes
18 #include "lldb/lldb-private.h"
19 #include "lldb/Interpreter/CommandInterpreter.h"
20 #include "lldb/Interpreter/CommandReturnObject.h"
23 using namespace lldb_private;
25 //-------------------------------------------------------------------------
26 // CommandObjectVersion
27 //-------------------------------------------------------------------------
29 CommandObjectVersion::CommandObjectVersion (CommandInterpreter &interpreter) :
30 CommandObjectParsed (interpreter, "version", "Show version of LLDB debugger.", "version")
34 CommandObjectVersion::~CommandObjectVersion ()
39 CommandObjectVersion::DoExecute (Args& args, CommandReturnObject &result)
41 if (args.GetArgumentCount() == 0)
43 result.AppendMessageWithFormat ("%s\n", lldb_private::GetVersion());
44 result.SetStatus (eReturnStatusSuccessFinishResult);
48 result.AppendError("the version command takes no arguments.");
49 result.SetStatus (eReturnStatusFailed);