jingham accepted this revision.
jingham added a comment.

There was one missing use of GetLastFile (as opposed to doing it by hand.)

Getting the default file is not used in any performance critical way that I'm 
aware of.  It's mostly used for "break set -l" with no "-f" and list with no 
arguments and commands of that sort.  So the extra lookup to get the FileSP 
from the source manager instead of caching it directly should not cause 
problems.  And if you asked not to cache, you've already decided to pay the 
cost for that.

LGTM with that trivial fix.



================
Comment at: lldb/source/Core/SourceManager.cpp:175-176
 
-  if (m_last_file_sp.get()) {
+  FileSP last_file_sp(GetFile(m_last_file_spec));
+  if (last_file_sp.get()) {
     const uint32_t end_line = start_line + count - 1;
----------------
labath wrote:
> `if(FileSP last_file_sp = GetLastFile())`
Doesn't look like this got converted to GetLastFile.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76806/new/

https://reviews.llvm.org/D76806



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to