PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.

llvm-svn: 99257
This commit is contained in:
Daniel Dunbar
2010-03-23 05:09:10 +00:00
parent de04b3f62c
commit cb9eaf59fb
6 changed files with 30 additions and 4 deletions

View File

@@ -48,14 +48,15 @@ public:
IncludeSystemHeaders(Opts.IncludeSystemHeaders),
PhonyTarget(Opts.UsePhonyTargets) {}
~DependencyFileCallback() {
virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
SrcMgr::CharacteristicKind FileType);
virtual void EndOfMainFile() {
OutputDependencyFile();
OS->flush();
delete OS;
OS = 0;
}
virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
SrcMgr::CharacteristicKind FileType);
};
}