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
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp
index 94bee6b..2a7af8a 100644
--- a/lib/Frontend/CacheTokens.cpp
+++ b/lib/Frontend/CacheTokens.cpp
@@ -518,14 +518,9 @@
~StatListener() {}
LookupResult getStat(const char *Path, struct stat &StatBuf) {
- LookupResult Result = FileSystemStatCache::statChained(Path, 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;
-
- if (Result == CacheHitMissing) // Failed 'stat'.
+ if (Result == CacheMissing) // Failed 'stat'.
PM.insert(PTHEntryKeyVariant(Path), PTHEntry());
else if (S_ISDIR(StatBuf.st_mode)) {
// Only cache directories with absolute paths.