Finish up the diagnostic client before we've torn down the ASTReader,

since the diagnostic client might poke at source locations that have
not yet been deserialized.

llvm-svn: 125204
This commit is contained in:
Douglas Gregor 2011-02-09 18:47:31 +00:00
parent d5c17bb863
commit 1388a89999
1 changed files with 3 additions and 3 deletions

View File

@ -290,6 +290,9 @@ void FrontendAction::Execute() {
void FrontendAction::EndSourceFile() {
CompilerInstance &CI = getCompilerInstance();
// Inform the diagnostic client we are done with this source file.
CI.getDiagnosticClient().EndSourceFile();
// Finalize the action.
EndSourceFileAction();
@ -328,9 +331,6 @@ void FrontendAction::EndSourceFile() {
// an error.
CI.clearOutputFiles(/*EraseFiles=*/CI.getDiagnostics().hasErrorOccurred());
// Inform the diagnostic client we are done with this source file.
CI.getDiagnosticClient().EndSourceFile();
if (isCurrentFileAST()) {
CI.takeSema();
CI.takeASTContext();