Using `FileManager`'s caching and deduplication functionality for assigning identity to the module cache is handy, but it relies on two assumptions: * the rest of the compiler consistently calls `FileManager::getOptionalDirectoryRef()` with `/*CacheFailure=*/false` for the module cache path, * the VFS is not caching failed stats for the module cache path. This PR implements this functionality in the `ModuleCache` interface, which is conceptually the right place for it. This PR enables us to land the VFS simplifications in https://github.com/llvm/llvm-project/pull/190843.
18 KiB
18 KiB