diff options
Diffstat (limited to 'include/clang/Lex/PPCallbacks.h')
-rw-r--r-- | include/clang/Lex/PPCallbacks.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h index b2a80a6..fd07a29 100644 --- a/include/clang/Lex/PPCallbacks.h +++ b/include/clang/Lex/PPCallbacks.h @@ -75,12 +75,26 @@ public: /// /// \param EndLoc The location of the last token within the inclusion /// directive. + /// + /// \param SearchPath Contains the search path which was used to find the file + /// in the file system. If the file was found via an absolute include path, + /// SearchPath will be empty. For framework includes, the SearchPath and + /// RelativePath will be split up. For example, if an include of "Some/Some.h" + /// is found via the framework path + /// "path/to/Frameworks/Some.framework/Headers/Some.h", SearchPath will be + /// "path/to/Frameworks/Some.framework/Headers" and RelativePath will be + /// "Some.h". + /// + /// \param RelativePath The path relative to SearchPath, at which the include + /// file was found. This is equal to FileName except for framework includes. virtual void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, llvm::StringRef FileName, bool IsAngled, const FileEntry *File, - SourceLocation EndLoc) { + SourceLocation EndLoc, + llvm::StringRef SearchPath, + llvm::StringRef RelativePath) { } /// EndOfMainFile - This callback is invoked when the end of the main file is @@ -188,11 +202,13 @@ public: llvm::StringRef FileName, bool IsAngled, const FileEntry *File, - SourceLocation EndLoc) { - First->InclusionDirective(HashLoc, IncludeTok, FileName, IsAngled, File, - EndLoc); - Second->InclusionDirective(HashLoc, IncludeTok, FileName, IsAngled, File, - EndLoc); + SourceLocation EndLoc, + llvm::StringRef SearchPath, + llvm::StringRef RelativePath) { + First->InclusionDirective(HashLoc, IncludeTok, FileName, IsAngled, File, + EndLoc, SearchPath, RelativePath); + Second->InclusionDirective(HashLoc, IncludeTok, FileName, IsAngled, File, + EndLoc, SearchPath, RelativePath); } virtual void EndOfMainFile() { |