switch TextDiagnosticPrinter to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59597 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/TextDiagnosticPrinter.cpp b/lib/Driver/TextDiagnosticPrinter.cpp
index cfbe8a7..b4be930 100644
--- a/lib/Driver/TextDiagnosticPrinter.cpp
+++ b/lib/Driver/TextDiagnosticPrinter.cpp
@@ -14,6 +14,7 @@
 #include "clang/Driver/TextDiagnosticPrinter.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Lexer.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/ADT/SmallString.h"
 using namespace clang;
@@ -29,7 +30,7 @@
   unsigned LineNo = Pos.getLineNumber();
   
   OS << "In file included from " << Pos.getSourceName()
-     << ":" << LineNo << ":\n";
+     << ':' << LineNo << ":\n";
 }
 
 /// HighlightRange - Given a SourceRange and a line number, highlight (with ~'s)
@@ -127,10 +128,10 @@
            *LineEnd != '\n' && *LineEnd != '\r')
       ++LineEnd;
   
-    OS << Buffer->getBufferIdentifier() << ":" << LineNo << ":";
+    OS << Buffer->getBufferIdentifier() << ':' << LineNo << ':';
     if (ColNo && ShowColumn) 
-      OS << ColNo << ":";
-    OS << " ";
+      OS << ColNo << ':';
+    OS << ' ';
   }
   
   switch (Level) {
@@ -193,7 +194,9 @@
       CaretLine.erase(CaretLine.end()-1);
     
     // Emit what we have computed.
-    OS << SourceLine << "\n";
-    OS << CaretLine << "\n";
+    OS << SourceLine << '\n';
+    OS << CaretLine << '\n';
   }
+  
+  OS.flush();
 }