Replace direct uses of the Debugger's output stream with
uses of the asynchronous stream.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133076 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectCommands.cpp b/source/Commands/CommandObjectCommands.cpp
index a8c1631..e8d4377 100644
--- a/source/Commands/CommandObjectCommands.cpp
+++ b/source/Commands/CommandObjectCommands.cpp
@@ -929,7 +929,11 @@
switch (notification)
{
case eInputReaderActivate:
- reader.GetDebugger().GetOutputStream().Printf("%s\n", "Enter regular expressions in the form 's/<regex>/<subst>/' and terminate with an empty line:");
+ {
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream ();
+ out_stream->Printf("%s\n", "Enter regular expressions in the form 's/<regex>/<subst>/' and terminate with an empty line:");
+ out_stream->Flush();
+ }
break;
case eInputReaderReactivate:
break;
@@ -951,7 +955,9 @@
Error error (add_regex_cmd->AppendRegexSubstitution (bytes_strref));
if (error.Fail())
{
- reader.GetDebugger().GetOutputStream().Printf("error: %s\n", error.AsCString());
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
+ out_stream->Printf("error: %s\n", error.AsCString());
+ out_stream->Flush();
add_regex_cmd->InputReaderDidCancel ();
reader.SetIsDone (true);
}
@@ -959,9 +965,13 @@
break;
case eInputReaderInterrupt:
- reader.SetIsDone (true);
- reader.GetDebugger().GetOutputStream().PutCString("Regular expression command creations was cancelled.\n");
- add_regex_cmd->InputReaderDidCancel ();
+ {
+ reader.SetIsDone (true);
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
+ out_stream->PutCString("Regular expression command creations was cancelled.\n");
+ out_stream->Flush();
+ add_regex_cmd->InputReaderDidCancel ();
+ }
break;
case eInputReaderEndOfFile: