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.

llvm-svn: 133162
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 9f2e79e..7d1af33 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/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.");