aboutsummaryrefslogtreecommitdiff
path: root/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
commitaf96def468042cfbed55a4cc12b1bb917ead4f33 (patch)
tree052bbe02ee607f4b6c0c2c5d4473d9ce003127df /lib/Driver/Compilation.cpp
parent783bb7494c0551d1826afa5c005cc4a9afb16b6a (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Compilation.cpp')
-rw-r--r--lib/Driver/Compilation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp
index 48796afd82..a2fc9212a5 100644
--- a/lib/Driver/Compilation.cpp
+++ b/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.