summaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandObjectScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandObjectScript.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObjectScript.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/lldb/source/Interpreter/CommandObjectScript.cpp b/lldb/source/Interpreter/CommandObjectScript.cpp
index edb1f67e7b376..d61d0cac97621 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
}