aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-07 05:52:12 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-07 05:52:12 +0000
commit29f2787b6da552018a7716f18f5bd8f67bd6edb5 (patch)
tree59d30fc036a92926c58876d497b1ece1e63ce5b4 /lib/Frontend/CompilerInstance.cpp
parent68478b0cc1ff03c0d13ceca6800c5becf08791e7 (diff)
Make changes to SDiagsWriter to make it work in combination with the ARC migrator:
-Allow it to be used with multiple BeginSourceFile/EndSourceFile calls; for this introduce a "finish" callback method in the DiagnosticConsumer. SDiagsWriter finishes up the serialization file inside this method. -Make it independent of any particular DiagnosticsEngine; make it use the SourceManager of the Diagnostic object. -Ignore null source ranges. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 7b3fe7876b..4463fa7f2c 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -170,7 +170,7 @@ static void SetupSerializedDiagnostics(const DiagnosticOptions &DiagOpts,
}
DiagnosticConsumer *SerializedConsumer =
- clang::serialized_diags::create(OS.take(), Diags);
+ clang::serialized_diags::create(OS.take());
Diags.setClient(new ChainedDiagnosticConsumer(Diags.takeClient(),
@@ -660,6 +660,9 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
}
}
+ // Notify the diagnostic client that all files were processed.
+ getDiagnostics().getClient()->finish();
+
if (getDiagnosticOpts().ShowCarets) {
// We can have multiple diagnostics sharing one diagnostic client.
// Get the total number of warnings/errors from the client.