We avoid the count of diagnostics when not generating carent

diagnostics to improve gcc compatibility; useful for dejagnu testing.

llvm-svn: 70278
This commit is contained in:
Mike Stump 2009-04-28 01:19:10 +00:00
parent d456c48568
commit 6ea352a750
1 changed files with 4 additions and 3 deletions

View File

@ -1990,9 +1990,10 @@ int main(int argc, char **argv) {
fprintf(stderr, "clang version 1.0 based upon " PACKAGE_STRING
" hosted on " LLVM_HOSTTRIPLE "\n");
if (unsigned NumDiagnostics = Diags.getNumDiagnostics())
fprintf(stderr, "%d diagnostic%s generated.\n", NumDiagnostics,
(NumDiagnostics == 1 ? "" : "s"));
if (!NoCaretDiagnostics)
if (unsigned NumDiagnostics = Diags.getNumDiagnostics())
fprintf(stderr, "%d diagnostic%s generated.\n", NumDiagnostics,
(NumDiagnostics == 1 ? "" : "s"));
if (Stats) {
FileMgr.PrintStats();