diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-10-27 22:10:13 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-10-27 22:10:13 +0000 |
commit | 1a0625e5cf42ef98032a49bd69c048541002c5b2 (patch) | |
tree | 469d16f38b579cade30c6b32cfe41feac81f7f8d /clang | |
parent | eb3e41417da2766b0ff1033ed8c40050121d08e6 (diff) | |
download | bcm5719-llvm-1a0625e5cf42ef98032a49bd69c048541002c5b2.tar.gz bcm5719-llvm-1a0625e5cf42ef98032a49bd69c048541002c5b2.zip |
With -verify, only exit early on failure.
- Nice if -verify test exercise the various cleanup functions.
llvm-svn: 58285
Diffstat (limited to 'clang')
-rw-r--r-- | clang/Driver/clang.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index ca0dc444384..ac5a4b281a3 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -1321,7 +1321,8 @@ static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF, ParseAST(PP, Consumer.get(), Stats, !DisableFree); if (VerifyDiagnostics) - exit(CheckDiagnostics(PP)); + if (CheckDiagnostics(PP)) + exit(1); if (Stats) { fprintf(stderr, "\nSTATISTICS FOR '%s':\n", InFile.c_str()); @@ -1529,5 +1530,9 @@ int main(int argc, char **argv) { fprintf(stderr, "\n"); } + // If verifying diagnostics and we reached here, all is well. + if (VerifyDiagnostics) + return 0; + return HadErrors || (Diags.getNumErrors() != 0); } |