aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-18 21:47:07 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-18 21:47:07 +0000
commit31448a415eeb1ac3243f16cc553562e452baddc1 (patch)
treeb86d819103402bbc144056628342614711ba6d00 /clang/lib/Frontend/FrontendAction.cpp
parent8d5038c1b3a540df76a39c0b5b25cbc5de870946 (diff)
downloadllvm-31448a415eeb1ac3243f16cc553562e452baddc1.zip
llvm-31448a415eeb1ac3243f16cc553562e452baddc1.tar.gz
llvm-31448a415eeb1ac3243f16cc553562e452baddc1.tar.bz2
Use hasErrorOccurred() instead of getNumErrors() where it makes sense.
llvm-svn: 119746
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index cfa0b6d..2e9d05f 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/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();