aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Compilation.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-21 00:40:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-21 00:40:53 +0000
commit1acb0eb24f34868849a8d22c45c4e6677efa0f58 (patch)
treebced5e8c97c5ec8c2a7ee6cef0670e385ac0325c /clang/lib/Driver/Compilation.cpp
parentf97c47ca158aa6263266a3b64901a1ed200df511 (diff)
downloadllvm-1acb0eb24f34868849a8d22c45c4e6677efa0f58.zip
llvm-1acb0eb24f34868849a8d22c45c4e6677efa0f58.tar.gz
llvm-1acb0eb24f34868849a8d22c45c4e6677efa0f58.tar.bz2
Driver: Give Compilation::Execute total control over the Driver result
code; and don't return an error code when -### is present, even if errors occur. llvm-svn: 67425
Diffstat (limited to 'clang/lib/Driver/Compilation.cpp')
-rw-r--r--clang/lib/Driver/Compilation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp
index 48796af..a2fc921 100644
--- a/clang/lib/Driver/Compilation.cpp
+++ b/clang/lib/Driver/Compilation.cpp
@@ -160,6 +160,10 @@ int Compilation::Execute() const {
return 0;
}
+ // If there were errors building the compilation, quit now.
+ if (getDriver().getDiags().getNumErrors())
+ return 1;
+
int Res = ExecuteJob(Jobs);
// Remove temp files.