- Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126015 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index b6cd3c7..a690670 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -1518,6 +1518,8 @@
 {
     size_t num_lines = commands.GetSize();
     CommandReturnObject tmp_result;
+    tmp_result.SetImmediateOutputStream (result.GetImmediateOutputStream ());
+    tmp_result.SetImmediateErrorStream (result.GetImmediateErrorStream ());
     
     // If we are going to continue past a "continue" then we need to run the commands synchronously.
     // Make sure you reset this value anywhere you return from the function.
@@ -1554,7 +1556,7 @@
         if (print_results)
         {
             if (tmp_result.Succeeded())
-              result.AppendMessageWithFormat("%s", tmp_result.GetOutputStream().GetData());
+              result.AppendMessageWithFormat("%s", tmp_result.GetOutputData());
         }
                 
         if (!success || !tmp_result.Succeeded())
@@ -1572,7 +1574,7 @@
                 result.AppendMessageWithFormat ("Command #%d '%s' failed with error: %s.\n", 
                                                 idx + 1, 
                                                 cmd, 
-                                                tmp_result.GetErrorStream().GetData());
+                                                tmp_result.GetErrorData());
             }
         }