[cfe-commits] r57080 - /cfe/trunk/Driver/clang.cpp
Daniel Dunbar
daniel at zuster.org
Sat Oct 4 16:42:50 PDT 2008
Author: ddunbar
Date: Sat Oct 4 18:42:49 2008
New Revision: 57080
URL: http://llvm.org/viewvc/llvm-project?rev=57080&view=rev
Log:
Set exit code properly on "Unexpected program action".
Modified:
cfe/trunk/Driver/clang.cpp
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=57080&r1=57079&r2=57080&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Sat Oct 4 18:42:49 2008
@@ -54,6 +54,8 @@
// Global options.
//===----------------------------------------------------------------------===//
+bool HadErrors = false;
+
static llvm::cl::opt<bool>
Verbose("v", llvm::cl::desc("Enable verbose output"));
static llvm::cl::opt<bool>
@@ -1096,6 +1098,7 @@
if (!Consumer) {
fprintf(stderr, "Unexpected program action!\n");
+ HadErrors = true;
return;
}
@@ -1359,5 +1362,5 @@
fprintf(stderr, "\n");
}
- return Diags.getNumErrors() != 0;
+ return HadErrors || (Diags.getNumErrors() != 0);
}
More information about the cfe-commits
mailing list