Add 'batch_mode' to CommandInterpreter.  Modify InputReaders to
not write output (prompts, instructions,etc.) if the CommandInterpreter
is in batch_mode.

Also, finish updating InputReaders to write to the asynchronous stream,
rather than using the Debugger's output file directly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133162 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectExpression.cpp b/source/Commands/CommandObjectExpression.cpp
index 9f2e79e..7d1af33 100644
--- a/source/Commands/CommandObjectExpression.cpp
+++ b/source/Commands/CommandObjectExpression.cpp
@@ -191,10 +191,12 @@
 )
 {
     CommandObjectExpression *cmd_object_expr = (CommandObjectExpression *) baton;
-
+    bool batch_mode = reader.GetDebugger().GetCommandInterpreter().GetBatchCommandMode();
+    
     switch (notification)
     {
     case eInputReaderActivate:
+        if (!batch_mode)
         {
             StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
             out_stream->Printf("%s\n", "Enter expressions, then terminate with an empty line to evaluate:");
@@ -224,6 +226,7 @@
     case eInputReaderInterrupt:
         cmd_object_expr->m_expr_lines.clear();
         reader.SetIsDone (true);
+        if (!batch_mode)
         {
             StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
             out_stream->Printf("%s\n", "Expression evaluation cancelled.");