diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-02-15 19:45:34 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-02-15 19:45:34 +0000 |
commit | ceb15656fbab9ee1da319afa4934b8f6a5964758 (patch) | |
tree | a9af1d851a537b01e7dcb90f386c7cbb8de525f2 /lib/Frontend/TextDiagnosticPrinter.cpp | |
parent | e4e68d45f89ff4899d30cbd196603d09b7fbc150 (diff) |
Remove the unuseful -fdiagnostics-show-name
This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.
Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.
Reviewed by Chris Lattner & Ted Kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index 465dcad80c..6445a0cc79 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/lib/Frontend/TextDiagnosticPrinter.cpp @@ -46,16 +46,6 @@ void TextDiagnosticPrinter::EndSourceFile() { TextDiag.reset(0); } -/// \brief Print the diagnostic name to a raw_ostream. -/// -/// This prints the diagnostic name to a raw_ostream if it has one. It formats -/// the name according to the expected diagnostic message formatting: -/// " [diagnostic_name_here]" -static void printDiagnosticName(raw_ostream &OS, const Diagnostic &Info) { - if (!DiagnosticIDs::isBuiltinNote(Info.getID())) - OS << " [" << DiagnosticIDs::getName(Info.getID()) << "]"; -} - /// \brief Print any diagnostic option information to a raw_ostream. /// /// This implements all of the logic for adding diagnostic options to a message @@ -136,8 +126,6 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, Info.FormatDiagnostic(OutStr); llvm::raw_svector_ostream DiagMessageStream(OutStr); - if (DiagOpts->ShowNames) - printDiagnosticName(DiagMessageStream, Info); printDiagnosticOptions(DiagMessageStream, Level, Info, *DiagOpts); // Keeps track of the the starting position of the location |