[Lldb-commits] [PATCH] D76806: Remove m_last_file_sp from SourceManager

Emre Kultursay via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 25 15:11:30 PDT 2020


emrekultursay created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

...and replace it with m_last_file_spec instead.

When Source Cache is enabled, the value stored in m_last_file_sp is
already in the Source Cache, and caching it again in SourceManager
brings no extra benefit. All we need is to "remember" the last used
file, and FileSpec can serve the same purpose.

When Source Cache is disabled, the user explicitly requested no caching
of source files, and therefore, m_last_file_sp should NOT be used.

Depends on D76805 <https://reviews.llvm.org/D76805>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76806

Files:
  lldb/include/lldb/Core/SourceManager.h
  lldb/source/Core/SourceManager.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76806.252682.patch
Type: text/x-patch
Size: 5970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200325/d21ce992/attachment.bin>


More information about the lldb-commits mailing list