[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 11 09:46:02 PDT 2024
================
@@ -159,7 +159,37 @@ DependencyScanningFilesystemSharedCache::CacheShard::
getOrInsertEntryForFilename(StringRef Filename,
const CachedFileSystemEntry &Entry) {
std::lock_guard<std::mutex> LockGuard(CacheLock);
- return *EntriesByFilename.insert({Filename, &Entry}).first->getValue();
+ CacheByFilename[Filename].first = &Entry;
----------------
benlangmuir wrote:
This is changing "get or insert" into "replace".
https://github.com/llvm/llvm-project/pull/68645
More information about the cfe-commits
mailing list