From dbd8209b33e6c9f151e4913a9c095d64a95439c4 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 23 Mar 2010 05:09:10 +0000 Subject: PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/FrontendAction.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Frontend/FrontendAction.cpp') diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 66df7a6191..110612d03b 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -169,6 +169,10 @@ void FrontendAction::EndSourceFile() { CI.setASTContext(0); } + // Inform the preprocessor we are done. + if (CI.hasPreprocessor()) + CI.getPreprocessor().EndSourceFile(); + if (CI.getFrontendOpts().ShowStats) { llvm::errs() << "\nSTATISTICS FOR '" << getCurrentFile() << "':\n"; CI.getPreprocessor().PrintStats(); -- cgit v1.2.3-18-g5258