diff options
Diffstat (limited to 'clang/lib/Frontend/HeaderIncludeGen.cpp')
-rw-r--r-- | clang/lib/Frontend/HeaderIncludeGen.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Frontend/HeaderIncludeGen.cpp b/clang/lib/Frontend/HeaderIncludeGen.cpp index df3f534..1ee47d8 100644 --- a/clang/lib/Frontend/HeaderIncludeGen.cpp +++ b/clang/lib/Frontend/HeaderIncludeGen.cpp @@ -45,6 +45,9 @@ public: void FileChanged(SourceLocation Loc, FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, FileID PrevFID) override; + + void FileSkipped(const FileEntryRef &SkippedFile, const Token &FilenameTok, + SrcMgr::CharacteristicKind FileType) override; }; } @@ -181,3 +184,16 @@ void HeaderIncludesCallback::FileChanged(SourceLocation Loc, MSStyle); } } + +void HeaderIncludesCallback::FileSkipped(const FileEntryRef &SkippedFile, const + Token &FilenameTok, + SrcMgr::CharacteristicKind FileType) { + if (!DepOpts.ShowSkippedHeaderIncludes) + return; + + if (!DepOpts.IncludeSystemHeaders && isSystem(FileType)) + return; + + PrintHeaderInfo(OutputFile, SkippedFile.getName(), ShowDepth, + CurrentIncludeDepth + 1, MSStyle); +} |