summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ARCMT.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-18 00:53:41 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-18 00:53:41 +0000
commit90b6a2a6a78273b0df86485c887bb66c3daaaadf (patch)
tree1c061ed10b66cdc3877a25cdaa9a9da3d9298823 /clang/lib/ARCMigrate/ARCMT.cpp
parent0f3f9f78f8e8b0e13cef69edf22bc62860f5e9ea (diff)
downloadbcm5719-llvm-90b6a2a6a78273b0df86485c887bb66c3daaaadf.tar.gz
bcm5719-llvm-90b6a2a6a78273b0df86485c887bb66c3daaaadf.zip
[arcmt] Fix the ARC migrator. -arcmt-modify requires running before the initialization of SourceManager
because it is going to modify the input file. llvm-svn: 133323
Diffstat (limited to 'clang/lib/ARCMigrate/ARCMT.cpp')
-rw-r--r--clang/lib/ARCMigrate/ARCMT.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp
index a93f1c62c0e..99980345c40 100644
--- a/clang/lib/ARCMigrate/ARCMT.cpp
+++ b/clang/lib/ARCMigrate/ARCMT.cpp
@@ -79,6 +79,14 @@ void CapturedDiagList::reportDiagnostics(Diagnostic &Diags) const {
Diags.Report(*I);
}
+bool CapturedDiagList::hasErrors() const {
+ for (ListTy::const_iterator I = List.begin(), E = List.end(); I != E; ++I)
+ if (I->getLevel() >= Diagnostic::Error)
+ return true;
+
+ return false;
+}
+
namespace {
class CaptureDiagnosticClient : public DiagnosticClient {
@@ -236,7 +244,7 @@ bool arcmt::checkForManualIssues(CompilerInvocation &origCI,
DiagClient->EndSourceFile();
- return Diags->getClient()->getNumErrors() > 0;
+ return capturedDiags.hasErrors();
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud