diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /lib/Frontend/LogDiagnosticPrinter.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'lib/Frontend/LogDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Frontend/LogDiagnosticPrinter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/LogDiagnosticPrinter.cpp b/lib/Frontend/LogDiagnosticPrinter.cpp index 8b585be..3fee957 100644 --- a/lib/Frontend/LogDiagnosticPrinter.cpp +++ b/lib/Frontend/LogDiagnosticPrinter.cpp @@ -12,6 +12,7 @@ #include "clang/Basic/SourceManager.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/ErrorHandling.h" using namespace clang; LogDiagnosticPrinter::LogDiagnosticPrinter(raw_ostream &os, @@ -28,14 +29,13 @@ LogDiagnosticPrinter::~LogDiagnosticPrinter() { static StringRef getLevelName(DiagnosticsEngine::Level Level) { switch (Level) { - default: - return "<unknown>"; case DiagnosticsEngine::Ignored: return "ignored"; case DiagnosticsEngine::Note: return "note"; case DiagnosticsEngine::Warning: return "warning"; case DiagnosticsEngine::Error: return "error"; case DiagnosticsEngine::Fatal: return "fatal error"; } + llvm_unreachable("Invalid DiagnosticsEngine level!"); } // Escape XML characters inside the raw string. @@ -64,7 +64,7 @@ void LogDiagnosticPrinter::EndSourceFile() { return; // Write to a temporary string to ensure atomic write of diagnostic object. - llvm::SmallString<512> Msg; + SmallString<512> Msg; llvm::raw_svector_ostream OS(Msg); OS << "<dict>\n"; @@ -140,7 +140,7 @@ void LogDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, DE.DiagnosticLevel = Level; // Format the message. - llvm::SmallString<100> MessageStr; + SmallString<100> MessageStr; Info.FormatDiagnostic(MessageStr); DE.Message = MessageStr.str(); |