aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/HeaderMap.h
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
commitb5142bb7af5c70fffd09f05172a1379a35a9c29a (patch)
tree2d853fec292436890550beaa0f2fd014c5f3fb83 /include/clang/Lex/HeaderMap.h
parent60b3e38d421cab497de1c62c06be6a6a5f321edf (diff)
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
Diffstat (limited to 'include/clang/Lex/HeaderMap.h')
-rw-r--r--include/clang/Lex/HeaderMap.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Lex/HeaderMap.h b/include/clang/Lex/HeaderMap.h
index 8a5c83ecf4..54c7eb47c8 100644
--- a/include/clang/Lex/HeaderMap.h
+++ b/include/clang/Lex/HeaderMap.h
@@ -17,6 +17,7 @@
namespace llvm {
class MemoryBuffer;
class StringRef;
+ template <typename T> class SmallVectorImpl;
}
namespace clang {
class FileEntry;
@@ -47,7 +48,12 @@ public:
/// LookupFile - Check to see if the specified relative filename is located in
/// this HeaderMap. If so, open it and return its FileEntry.
- const FileEntry *LookupFile(llvm::StringRef Filename, FileManager &FM) const;
+ /// If RawPath is not NULL and the file is found, RawPath will be set to the
+ /// raw path at which the file was found in the file system. For example,
+ /// for a search path ".." and a filename "../file.h" this would be
+ /// "../../file.h".
+ const FileEntry *LookupFile(llvm::StringRef Filename, FileManager &FM,
+ llvm::SmallVectorImpl<char> *RawPath) const;
/// getFileName - Return the filename of the headermap.
const char *getFileName() const;