summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PreprocessingRecord.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-03-16 18:34:36 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-03-16 18:34:36 +0000
commit3cc331a160cf5f318c532ca96f2e6b0821ced87c (patch)
tree935fd835dc9a47972aeac0c90e622e232e899c23 /clang/lib/Lex/PreprocessingRecord.cpp
parentd4346f2388921b5b75cd19e64a0b3f797eaf0cd7 (diff)
downloadbcm5719-llvm-3cc331a160cf5f318c532ca96f2e6b0821ced87c.tar.gz
bcm5719-llvm-3cc331a160cf5f318c532ca96f2e6b0821ced87c.zip
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. llvm-svn: 127742
Diffstat (limited to 'clang/lib/Lex/PreprocessingRecord.cpp')
-rw-r--r--clang/lib/Lex/PreprocessingRecord.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/Lex/PreprocessingRecord.cpp b/clang/lib/Lex/PreprocessingRecord.cpp
index 3a43ac11e4e..b7f6e75c47c 100644
--- a/clang/lib/Lex/PreprocessingRecord.cpp
+++ b/clang/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<char> &RawPath) {
InclusionDirective::InclusionKind Kind = InclusionDirective::Include;
switch (IncludeTok.getIdentifierInfo()->getPPKeywordID()) {
OpenPOWER on IntegriCloud