diff options
Diffstat (limited to 'include/clang/Lex/PPCallbacks.h')
-rw-r--r-- | include/clang/Lex/PPCallbacks.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h index e891e94..d74124e 100644 --- a/include/clang/Lex/PPCallbacks.h +++ b/include/clang/Lex/PPCallbacks.h @@ -44,6 +44,14 @@ public: SrcMgr::CharacteristicKind FileType) { } + /// FileSkipped - This callback is invoked whenever a source file is + /// skipped as the result of header guard optimization. ParentFile + /// is the file that #includes the skipped file. FilenameTok is the + /// token in ParentFile that indicates the skipped file. + virtual void FileSkipped(const FileEntry &ParentFile, + const Token &FilenameTok, + SrcMgr::CharacteristicKind FileType) { + } /// EndOfMainFile - This callback is invoked when the end of the main file is /// reach, no subsequent callbacks will be made. @@ -96,6 +104,13 @@ public: Second->FileChanged(Loc, Reason, FileType); } + virtual void FileSkipped(const FileEntry &ParentFile, + const Token &FilenameTok, + SrcMgr::CharacteristicKind FileType) { + First->FileSkipped(ParentFile, FilenameTok, FileType); + Second->FileSkipped(ParentFile, FilenameTok, FileType); + } + virtual void EndOfMainFile() { First->EndOfMainFile(); Second->EndOfMainFile(); |