From d6f611198089b78e32d3a15fe8bc986204aee1aa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Nov 2010 20:05:15 +0000 Subject: 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 --- lib/Basic/FileSystemStatCache.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/Basic/FileSystemStatCache.cpp') 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. -- cgit v1.2.3