diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-06-25 09:51:55 -0700 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-06-25 09:55:46 -0700 |
| commit | 842283652eb89e7c207ecfdac5e546472332f02b (patch) | |
| tree | 99ac33ddd87880faa65a31ba926fbf151b088823 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | 79d7e9c7d07a7ba4a65f4579bf3a8756c757e634 (diff) | |
[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.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 40ce7d997800..d7f2fc659cf6 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<std::unique_ptr<ScriptInterpreterIORedirect>> - 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( |
