Files
clang-p2996/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h
Zachary Turner 2c1f46dcc6 Convert the ScriptInterpreter system to a plugin-based one.
Previously embedded interpreters were handled as ad-hoc source
files compiled into source/Interpreter.  This made it hard to
disable a specific interpreter, or to add support for other
interpreters and allow the developer to choose which interpreter(s)
were enabled for a particular build.

This patch converts script interpreters over to a plugin-based system.
Script interpreters now live in source/Plugins/ScriptInterpreter, and
the canonical LLDB interpreter, ScriptInterpreterPython, is moved there
as well.

Any new code interfacing with the Python C API must live in this location
from here on out.  Additionally, generic code should never need to
reference or make assumptions about the presence of a specific interpreter
going forward.

Differential Revision: http://reviews.llvm.org/D11431
Reviewed By: Greg Clayton

llvm-svn: 243681
2015-07-30 20:28:07 +00:00

63 lines
1.6 KiB
C++

//===-- ScriptInterpreterNone.h ---------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ScriptInterpreterNone_h_
#define liblldb_ScriptInterpreterNone_h_
#include "lldb/Interpreter/ScriptInterpreter.h"
namespace lldb_private
{
class ScriptInterpreterNone : public ScriptInterpreter
{
public:
ScriptInterpreterNone(CommandInterpreter &interpreter);
~ScriptInterpreterNone();
bool
ExecuteOneLine(const char *command, CommandReturnObject *result,
const ExecuteScriptOptions &options = ExecuteScriptOptions());
void
ExecuteInterpreterLoop();
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void
Initialize();
static void
Terminate();
static lldb::ScriptInterpreterSP
CreateInstance(CommandInterpreter &interpreter);
static lldb_private::ConstString
GetPluginNameStatic();
static const char *
GetPluginDescriptionStatic();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
virtual lldb_private::ConstString
GetPluginName();
virtual uint32_t
GetPluginVersion();
};
} // namespace lldb_private
#endif // #ifndef liblldb_ScriptInterpreterNone_h_