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 "CommandObjectVersion.h"
14 // Other libraries and framework includes
16 #include "lldb/lldb-private.h"
17 #include "lldb/Interpreter/CommandInterpreter.h"
18 #include "lldb/Interpreter/CommandReturnObject.h"
21 using namespace lldb_private;
23 //-------------------------------------------------------------------------
24 // CommandObjectVersion
25 //-------------------------------------------------------------------------
27 CommandObjectVersion::CommandObjectVersion (CommandInterpreter &interpreter) :
28 CommandObjectParsed (interpreter, "version", "Show version of LLDB debugger.", "version")
32 CommandObjectVersion::~CommandObjectVersion ()
37 CommandObjectVersion::DoExecute (Args& args, CommandReturnObject &result)
39 if (args.GetArgumentCount() == 0)
41 result.AppendMessageWithFormat ("%s\n", lldb_private::GetVersion());
42 result.SetStatus (eReturnStatusSuccessFinishResult);
46 result.AppendError("the version command takes no arguments.");
47 result.SetStatus (eReturnStatusFailed);