diff options
Diffstat (limited to 'clang/lib/Frontend/CacheTokens.cpp')
-rw-r--r-- | clang/lib/Frontend/CacheTokens.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Frontend/CacheTokens.cpp b/clang/lib/Frontend/CacheTokens.cpp index 94bee6b868b..2a7af8a8c35 100644 --- a/clang/lib/Frontend/CacheTokens.cpp +++ b/clang/lib/Frontend/CacheTokens.cpp @@ -518,14 +518,9 @@ public: ~StatListener() {} LookupResult getStat(const char *Path, struct stat &StatBuf) { - LookupResult Result = FileSystemStatCache::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'. + LookupResult Result = statChained(Path, StatBuf); + + if (Result == CacheMissing) // Failed 'stat'. PM.insert(PTHEntryKeyVariant(Path), PTHEntry()); else if (S_ISDIR(StatBuf.st_mode)) { // Only cache directories with absolute paths. |