aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-23 21:17:56 +0000
committerChris Lattner <sabre@nondot.org>2010-11-23 21:17:56 +0000
commit898a061f69e1145bf89a987c08203132b9922a3c (patch)
treebde19ba5ef8b70e02451772ced8e6d09920ee4e0 /lib/Lex/PTHLexer.cpp
parentf9f7766846a205bc900b578f944567e679b221aa (diff)
change the 'is directory' indicator to be a null-or-not
pointer that is passed down through the APIs, and make FileSystemStatCache::get be the one that filters out directory lookups that hit files. This also paves the way to have stat queries be able to return opened files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r--lib/Lex/PTHLexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index ed068675fe..b6bc7ce488 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -678,13 +678,14 @@ public:
~PTHStatCache() {}
- LookupResult getStat(const char *Path, struct stat &StatBuf) {
+ LookupResult getStat(const char *Path, struct stat &StatBuf,
+ int *FileDescriptor) {
// Do the lookup for the file's data in the PTH file.
CacheTy::iterator I = Cache.find(Path);
// If we don't get a hit in the PTH file just forward to 'stat'.
if (I == Cache.end())
- return statChained(Path, StatBuf);
+ return statChained(Path, StatBuf, FileDescriptor);
const PTHStatData &Data = *I;