[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 26 09:36:16 PDT 2023
================
@@ -168,6 +170,12 @@ class DependencyScanningFilesystemSharedCache {
/// The backing storage for cached contents.
llvm::SpecificBumpPtrAllocator<CachedFileContents> ContentsStorage;
+ /// Map from filenames to cached real paths.
+ llvm::StringMap<const CachedRealPath *> RealPathsByFilename;
----------------
benlangmuir wrote:
I would lean towards combining them unless there's a drawback I'm not seeing - the keys are fairly large here so it's nice to share storage for that. I would maybe feel differently for a DenseMap of small keys :shrug:
https://github.com/llvm/llvm-project/pull/68645
More information about the cfe-commits
mailing list