summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-19 06:56:25 +0000
committerChris Lattner <sabre@nondot.org>2008-11-19 06:56:25 +0000
commit327984f4c4bf79fcc9c16896b25f9f97ba6611ed (patch)
tree3bb8db55f4b66398b5e750fb3e36b3fa6e82b152 /clang/lib/Driver
parent23be0674074db5a815ba2a0d2aacc36c1372a660 (diff)
downloadbcm5719-llvm-327984f4c4bf79fcc9c16896b25f9f97ba6611ed.tar.gz
bcm5719-llvm-327984f4c4bf79fcc9c16896b25f9f97ba6611ed.zip
switch TextDiagnosticPrinter to raw_ostream.
llvm-svn: 59597
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/TextDiagnosticPrinter.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/clang/lib/Driver/TextDiagnosticPrinter.cpp b/clang/lib/Driver/TextDiagnosticPrinter.cpp
index cfbe8a7f927..b4be9307ea7 100644
--- a/clang/lib/Driver/TextDiagnosticPrinter.cpp
+++ b/clang/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 @@ PrintIncludeStack(FullSourceLoc Pos) {
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 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level,
*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 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level,
CaretLine.erase(CaretLine.end()-1);
// Emit what we have computed.
- OS << SourceLine << "\n";
- OS << CaretLine << "\n";
+ OS << SourceLine << '\n';
+ OS << CaretLine << '\n';
}
+
+ OS.flush();
}
OpenPOWER on IntegriCloud