[Lldb-commits] [PATCH] D153726: [lldb] Avoid FileSystem::Resolve for cached files in the SourceManager

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Jun 25 12:11:28 PDT 2023


JDevlieghere created this revision.
JDevlieghere added reviewers: bulbazord, clayborg, jingham, jasonmolenda.
Herald added a project: All.
JDevlieghere requested review of this revision.

Currently, source files are cached by their resolved path. This means that before we can query the cache, we potentially have to resolve the path, which can be slow. This patch avoids the call to FileSystem::Resolve by caching both the resolved and unresolved path. We now only resolve the path once when we create and cache a new file.


https://reviews.llvm.org/D153726

Files:
  lldb/include/lldb/Core/SourceManager.h
  lldb/include/lldb/Host/FileSystem.h
  lldb/source/Core/SourceManager.cpp
  lldb/source/Host/common/FileSystem.cpp
  lldb/unittests/Core/SourceManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153726.534369.patch
Type: text/x-patch
Size: 8661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230625/6dbf7f75/attachment.bin>


More information about the lldb-commits mailing list