Use Host::File in lldb_private::StreamFile and other places to cleanup host
layer a bit more.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125149 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index e239c55..8a302fe 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -1102,24 +1102,27 @@
 }
 
 size_t
-CommandInterpreter::GetConfirmationInputReaderCallback (void *baton,
-                                    InputReader &reader,
-                                    lldb::InputReaderAction action,
-                                    const char *bytes,
-                                    size_t bytes_len)
+CommandInterpreter::GetConfirmationInputReaderCallback 
+(
+    void *baton,
+    InputReader &reader,
+    lldb::InputReaderAction action,
+    const char *bytes,
+    size_t bytes_len
+)
 {
-    FILE *out_fh = reader.GetDebugger().GetOutputFileHandle();
+    File &out_file = reader.GetDebugger().GetOutputFile();
     bool *response_ptr = (bool *) baton;
     
     switch (action)
     {
     case eInputReaderActivate:
-        if (out_fh)
+        if (out_file.IsValid())
         {
             if (reader.GetPrompt())
             {
-                ::fprintf (out_fh, "%s", reader.GetPrompt());
-                ::fflush (out_fh);
+                out_file.Printf ("%s", reader.GetPrompt());
+                out_file.Flush ();
             }
         }
         break;
@@ -1128,10 +1131,10 @@
         break;
 
     case eInputReaderReactivate:
-        if (out_fh && reader.GetPrompt())
+        if (out_file.IsValid() && reader.GetPrompt())
         {
-            ::fprintf (out_fh, "%s", reader.GetPrompt());
-            ::fflush (out_fh);
+            out_file.Printf ("%s", reader.GetPrompt());
+            out_file.Flush ();
         }
         break;
 
@@ -1152,11 +1155,10 @@
         }
         else
         {
-            if (out_fh && !reader.IsDone() && reader.GetPrompt())
+            if (out_file.IsValid() && !reader.IsDone() && reader.GetPrompt())
             {
-                ::fprintf (out_fh, "Please answer \"y\" or \"n\"\n");
-                ::fprintf (out_fh, "%s", reader.GetPrompt());
-                ::fflush (out_fh);
+                out_file.Printf ("Please answer \"y\" or \"n\"\n%s", reader.GetPrompt());
+                out_file.Flush ();
             }
         }
         break;