From b5142bb7af5c70fffd09f05172a1379a35a9c29a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 16 Mar 2011 18:34:36 +0000 Subject: Add a 'RawPath' parameter to the PPCallbacks interface. This allows clients to observe the exact path through which an #included file was located. This is very useful when trying to record and replay inclusion operations without it beind influenced by the aggressive caching done inside the FileManager to avoid redundant system calls and filesystem operations. The work to compute and return this is only done in the presence of callbacks, so it should have no effect on normal compilation. Patch by Manuel Klimek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127742 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PreprocessingRecord.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/Lex/PreprocessingRecord.cpp') diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 3a43ac11e4..b7f6e75c47 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/lib/Lex/PreprocessingRecord.cpp @@ -146,12 +146,14 @@ void PreprocessingRecord::MacroUndefined(const Token &Id, MacroDefinitions.erase(Pos); } -void PreprocessingRecord::InclusionDirective(SourceLocation HashLoc, - const clang::Token &IncludeTok, - llvm::StringRef FileName, - bool IsAngled, - const FileEntry *File, - clang::SourceLocation EndLoc) { +void PreprocessingRecord::InclusionDirective( + SourceLocation HashLoc, + const clang::Token &IncludeTok, + llvm::StringRef FileName, + bool IsAngled, + const FileEntry *File, + clang::SourceLocation EndLoc, + const llvm::SmallVectorImpl &RawPath) { InclusionDirective::InclusionKind Kind = InclusionDirective::Include; switch (IncludeTok.getIdentifierInfo()->getPPKeywordID()) { -- cgit v1.2.3-70-g09d2