summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
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/Serialization
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/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index dc719a1f938..4994b4944e2 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -1074,14 +1074,15 @@ public:
~ASTStatCache() { delete Cache; }
- 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 AST file.
CacheTy::iterator I = Cache->find(Path);
// If we don't get a hit in the AST file just forward to 'stat'.
if (I == Cache->end()) {
++NumStatMisses;
- return statChained(Path, StatBuf);
+ return statChained(Path, StatBuf, FileDescriptor);
}
++NumStatHits;
OpenPOWER on IntegriCloud