xref: /llvm-project/lldb/source/Commands/CommandObjectVersion.cpp (revision 93a64300f8b9620213055926b194b9c5bbb10bcf)
1 //===-- CommandObjectVersion.cpp --------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "lldb/lldb-python.h"
11 
12 #include "CommandObjectVersion.h"
13 
14 // C Includes
15 // C++ Includes
16 // Other libraries and framework includes
17 // Project includes
18 #include "lldb/lldb-private.h"
19 #include "lldb/Interpreter/CommandInterpreter.h"
20 #include "lldb/Interpreter/CommandReturnObject.h"
21 
22 using namespace lldb;
23 using namespace lldb_private;
24 
25 //-------------------------------------------------------------------------
26 // CommandObjectVersion
27 //-------------------------------------------------------------------------
28 
29 CommandObjectVersion::CommandObjectVersion (CommandInterpreter &interpreter) :
30     CommandObjectParsed (interpreter, "version", "Show version of LLDB debugger.", "version")
31 {
32 }
33 
34 CommandObjectVersion::~CommandObjectVersion ()
35 {
36 }
37 
38 bool
39 CommandObjectVersion::DoExecute (Args& args, CommandReturnObject &result)
40 {
41     result.AppendMessageWithFormat ("%s\n", lldb_private::GetVersion());
42     result.SetStatus (eReturnStatusSuccessFinishResult);
43     return true;
44 }
45 
46