}
// If there were errors building the compilation, quit now.
- if (getDiags().getNumErrors())
+ if (getDiags().hasErrorOccurred())
return 1;
const Command *FailingCommand = 0;
// 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;
// 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();