summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandReturnObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandReturnObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandReturnObject.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp
index 3faf912bd7d..9d32279edab 100644
--- a/lldb/source/Interpreter/CommandReturnObject.cpp
+++ b/lldb/source/Interpreter/CommandReturnObject.cpp
@@ -19,10 +19,8 @@ using namespace lldb;
using namespace lldb_private;
CommandReturnObject::CommandReturnObject () :
- m_error_stream_string_sp (),
- m_output_stream_string_sp (),
- m_output_stream (),
- m_error_stream (),
+ m_out_stream (),
+ m_err_stream (),
m_status (eReturnStatusStarted),
m_did_change_process_state (false)
{
@@ -145,11 +143,15 @@ CommandReturnObject::HasResult ()
void
CommandReturnObject::Clear()
{
- if (m_output_stream_string_sp)
- static_cast<StreamString *>(m_output_stream_string_sp.get())->Clear();
- if (m_error_stream_string_sp)
- static_cast<StreamString *>(m_error_stream_string_sp.get())->Clear();
+ lldb::StreamSP stream_sp;
+ stream_sp = m_out_stream.GetStreamAtIndex (eStreamStringIndex);
+ if (stream_sp)
+ static_cast<StreamString *>(stream_sp.get())->Clear();
+ stream_sp = m_err_stream.GetStreamAtIndex (eStreamStringIndex);
+ if (stream_sp)
+ static_cast<StreamString *>(stream_sp.get())->Clear();
m_status = eReturnStatusStarted;
+ m_did_change_process_state = false;
}
bool
OpenPOWER on IntegriCloud