aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Driver/Driver.cpp4
-rw-r--r--lib/Frontend/FrontendAction.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 3cb0aa6101..5bb9a651d0 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -326,7 +326,7 @@ int Driver::ExecuteCompilation(const Compilation &C) const {
}
// If there were errors building the compilation, quit now.
- if (getDiags().getNumErrors())
+ if (getDiags().hasErrorOccurred())
return 1;
const Command *FailingCommand = 0;
@@ -998,7 +998,7 @@ void Driver::BuildJobs(Compilation &C) const {
// If the user passed -Qunused-arguments or there were errors, don't warn
// about any unused arguments.
- if (Diags.getNumErrors() ||
+ if (Diags.hasErrorOccurred() ||
C.getArgs().hasArg(options::OPT_Qunused_arguments))
return;
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp
index cfa0b6dbd3..2e9d05f3cf 100644
--- a/lib/Frontend/FrontendAction.cpp
+++ b/lib/Frontend/FrontendAction.cpp
@@ -288,7 +288,7 @@ void FrontendAction::EndSourceFile() {
// Cleanup the output streams, and erase the output files if we encountered
// an error.
- CI.clearOutputFiles(/*EraseFiles=*/CI.getDiagnostics().getNumErrors());
+ CI.clearOutputFiles(/*EraseFiles=*/CI.getDiagnostics().hasErrorOccurred());
// Inform the diagnostic client we are done with this source file.
CI.getDiagnosticClient().EndSourceFile();