aboutsummaryrefslogtreecommitdiff
path: root/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
commitd6f611198089b78e32d3a15fe8bc986204aee1aa (patch)
treed6395cf05d36ad6d8d5bba6a418b0f8396e00928 /lib/Basic/FileSystemStatCache.cpp
parent11aa4b03b054cb9d3c201bba5632241145865e29 (diff)
simplify the cache miss handling code, eliminating CacheMissing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileSystemStatCache.cpp')
-rw-r--r--lib/Basic/FileSystemStatCache.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Basic/FileSystemStatCache.cpp b/lib/Basic/FileSystemStatCache.cpp
index 738af41a9e..26e9d2f150 100644
--- a/lib/Basic/FileSystemStatCache.cpp
+++ b/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.