summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-23 20:05:15 +0000
committerChris Lattner <sabre@nondot.org>2010-11-23 20:05:15 +0000
commit8f0583daa2864318537a61b12e71c3264c227738 (patch)
tree9b5bc2e69bf0e820f92b5d8d5b42206f431dec8c /clang/lib/Basic/FileSystemStatCache.cpp
parent5769c3dffd6d7b1d7684c93eaea71e1277846e26 (diff)
downloadbcm5719-llvm-8f0583daa2864318537a61b12e71c3264c227738.tar.gz
bcm5719-llvm-8f0583daa2864318537a61b12e71c3264c227738.zip
simplify the cache miss handling code, eliminating CacheMissing.
llvm-svn: 120038
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
-rw-r--r--clang/lib/Basic/FileSystemStatCache.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp
index 738af41a9ee..26e9d2f1501 100644
--- a/clang/lib/Basic/FileSystemStatCache.cpp
+++ b/clang/lib/Basic/FileSystemStatCache.cpp
@@ -19,16 +19,11 @@ MemorizeStatCalls::LookupResult
MemorizeStatCalls::getStat(const char *Path, struct stat &StatBuf) {
LookupResult Result = statChained(Path, StatBuf);
- // If the chained cache didn't know anything about the file, do the stat now
- // so we can record the result.
- if (Result == CacheMiss)
- Result = ::stat(Path, &StatBuf) ? CacheHitMissing : CacheHitExists;
-
// Do not cache failed stats, it is easy to construct common inconsistent
// situations if we do, and they are not important for PCH performance (which
// currently only needs the stats to construct the initial FileManager
// entries).
- if (Result == CacheHitMissing)
+ if (Result == CacheMissing)
return Result;
// Cache file 'stat' results and directories with absolutely paths.
OpenPOWER on IntegriCloud