summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CacheTokens.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
commitdd278430a387f1dd916618c3a1b90c14c0064973 (patch)
tree5aaf703e2c6f7b4284f7e4e9ab54771f55bff513 /clang/lib/Frontend/CacheTokens.cpp
parent5aef638057816ef414bb6adde40eafafec78e1d3 (diff)
downloadbcm5719-llvm-dd278430a387f1dd916618c3a1b90c14c0064973.tar.gz
bcm5719-llvm-dd278430a387f1dd916618c3a1b90c14c0064973.zip
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. llvm-svn: 120060
Diffstat (limited to 'clang/lib/Frontend/CacheTokens.cpp')
-rw-r--r--clang/lib/Frontend/CacheTokens.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CacheTokens.cpp b/clang/lib/Frontend/CacheTokens.cpp
index 2a7af8a8c35..ae4cdb5063a 100644
--- a/clang/lib/Frontend/CacheTokens.cpp
+++ b/clang/lib/Frontend/CacheTokens.cpp
@@ -517,8 +517,9 @@ public:
StatListener(PTHMap &pm) : PM(pm) {}
~StatListener() {}
- LookupResult getStat(const char *Path, struct stat &StatBuf) {
- LookupResult Result = statChained(Path, StatBuf);
+ LookupResult getStat(const char *Path, struct stat &StatBuf,
+ int *FileDescriptor) {
+ LookupResult Result = statChained(Path, StatBuf, FileDescriptor);
if (Result == CacheMissing) // Failed 'stat'.
PM.insert(PTHEntryKeyVariant(Path), PTHEntry());
OpenPOWER on IntegriCloud