/// FileManager's FileSystemOptions.
bool getNoncachedStatValue(StringRef Path, struct stat &StatBuf);
+ /// \brief Remove the real file Entry from the cache.
+ void InvalidateCache(const FileEntry* Entry);
+
/// \brief If path is not absolute and FileSystemOptions set the working
/// directory, the path is modified to be relative to the given
/// working directory.
}
size_t size() const { return UniqueFiles.size(); }
+
+ friend class FileManager;
};
//===----------------------------------------------------------------------===//
}
size_t size() const { return UniqueFiles.size(); }
+
+ friend class FileManager;
};
#endif
return ::stat(FilePath.c_str(), &StatBuf) != 0;
}
+void FileManager::InvalidateCache(const FileEntry* Entry) {
+ if (!Entry)
+ return;
+
+ SeenFileEntries.erase(Entry->getName());
+ UniqueRealFiles.UniqueFiles.erase(*Entry);
+}
+
+
void FileManager::GetUniqueIDMapping(
SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
UIDToFiles.clear();