llvm-capstone/lldb/source/Commands/CommandObjectVersion.cpp
Zachary Turner 1124045ac7 Don't #include "lldb-python.h" from anywhere.
Since interaction with the python interpreter is moving towards
being more isolated, we won't be able to include this header from
normal files anymore, all includes of it should be localized to
the python library which will live under source/bindings/API/Python
after a future patch.

None of the files that were including this header actually depended
on it anyway, so it was just a dead include in every single instance.

llvm-svn: 238581
2015-05-29 17:41:47 +00:00

52 lines
1.5 KiB
C++

//===-- CommandObjectVersion.cpp --------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "CommandObjectVersion.h"
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
using namespace lldb;
using namespace lldb_private;
//-------------------------------------------------------------------------
// CommandObjectVersion
//-------------------------------------------------------------------------
CommandObjectVersion::CommandObjectVersion (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter, "version", "Show version of LLDB debugger.", "version")
{
}
CommandObjectVersion::~CommandObjectVersion ()
{
}
bool
CommandObjectVersion::DoExecute (Args& args, CommandReturnObject &result)
{
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;
}