From 706b4fc47bbc608932d3b491ae19a3b9cde9497b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Jan 2020 20:45:01 +0000 Subject: Vendor import of llvm-project master e26a78e70, the last commit before the llvmorg-11-init tag, from which release/10.x was branched. --- lldb/source/Interpreter/CommandObjectScript.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'lldb/source/Interpreter/CommandObjectScript.cpp') diff --git a/lldb/source/Interpreter/CommandObjectScript.cpp b/lldb/source/Interpreter/CommandObjectScript.cpp index edb1f67e7b37..d61d0cac9762 100644 --- a/lldb/source/Interpreter/CommandObjectScript.cpp +++ b/lldb/source/Interpreter/CommandObjectScript.cpp @@ -7,12 +7,9 @@ //===----------------------------------------------------------------------===// #include "CommandObjectScript.h" - - #include "lldb/Core/Debugger.h" - #include "lldb/DataFormatters/DataVisualization.h" - +#include "lldb/Host/Config.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/ScriptInterpreter.h" @@ -35,13 +32,6 @@ CommandObjectScript::~CommandObjectScript() {} bool CommandObjectScript::DoExecute(llvm::StringRef command, CommandReturnObject &result) { -#ifdef LLDB_DISABLE_PYTHON - // if we ever support languages other than Python this simple #ifdef won't - // work - result.AppendError("your copy of LLDB does not support scripting."); - result.SetStatus(eReturnStatusFailed); - return false; -#else if (m_interpreter.GetDebugger().GetScriptLanguage() == lldb::eScriptLanguageNone) { result.AppendError( @@ -58,9 +48,9 @@ bool CommandObjectScript::DoExecute(llvm::StringRef command, return false; } - DataVisualization::ForceUpdate(); // script might change Python code we use - // for formatting.. make sure we keep up to - // date with it + // Script might change Python code we use for formatting. Make sure we keep + // up to date with it. + DataVisualization::ForceUpdate(); if (command.empty()) { script_interpreter->ExecuteInterpreterLoop(); @@ -75,5 +65,4 @@ bool CommandObjectScript::DoExecute(llvm::StringRef command, result.SetStatus(eReturnStatusFailed); return result.Succeeded(); -#endif } -- cgit v1.3