For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.

llvm-svn: 141681
This commit is contained in:
Argyrios Kyrtzidis
2011-10-11 17:29:44 +00:00
parent ad018f10bc
commit 7a70d2f11b
5 changed files with 25 additions and 11 deletions

View File

@@ -118,7 +118,8 @@ public:
bool StartNewLineIfNeeded();
virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
SrcMgr::CharacteristicKind FileType);
SrcMgr::CharacteristicKind FileType,
FileID PrevFID);
virtual void Ident(SourceLocation Loc, const std::string &str);
virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind,
const std::string &Str);
@@ -235,7 +236,8 @@ bool PrintPPOutputPPCallbacks::StartNewLineIfNeeded() {
/// position.
void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc,
FileChangeReason Reason,
SrcMgr::CharacteristicKind NewFileType) {
SrcMgr::CharacteristicKind NewFileType,
FileID PrevFID) {
// Unless we are exiting a #include, make sure to skip ahead to the line the
// #include directive was at.
SourceManager &SourceMgr = SM;