summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Driver.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index bec4bf49281..3dc470cbe97 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -598,6 +598,8 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
bool CCCPrintPhases;
InputArgList Args = ParseArgStrings(ArgList.slice(1));
+ if (Diags.hasErrorOccurred())
+ return nullptr;
// Silence driver warnings if requested
Diags.setIgnoreAllWarnings(Args.hasArg(options::OPT_w));
OpenPOWER on IntegriCloud