From 842283652eb89e7c207ecfdac5e546472332f02b Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 25 Jun 2020 09:51:55 -0700 Subject: [lldb/ScriptInterpreter] Let the IORedirect factory handle IO being disabled. Have one factory method that decides how to initialize the ScriptInterpreterIORedirect object based on whether IO is enabled or disabled. --- .../Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 40ce7d9..d7f2fc6 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -912,10 +912,8 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLine( // we use the following more complicated method to pass the command string // directly down to Python. llvm::Expected> - io_redirect_or_error = - options.GetEnableIO() - ? ScriptInterpreterIORedirect::Create(m_debugger, result) - : ScriptInterpreterIORedirect::Create(); + io_redirect_or_error = ScriptInterpreterIORedirect::Create( + options.GetEnableIO(), m_debugger, result); if (!io_redirect_or_error) { if (result) result->AppendErrorWithFormatv( -- cgit v1.1