[Lldb-commits] [PATCH] D153834: [lldb] Add two-level caching in the source manager

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 27 11:41:16 PDT 2023


JDevlieghere added inline comments.


================
Comment at: lldb/source/Core/SourceManager.cpp:86
 
-  // It the target source path map has been updated, get this file again so we
-  // can successfully remap the source file
-  if (target_sp && file_sp &&
-      file_sp->GetSourceMapModificationID() !=
-          target_sp->GetSourcePathMap().GetModificationID())
-    file_sp.reset();
+  if (!debugger_sp && debugger_sp->GetUseSourceCache()) {
+    LLDB_LOG(log, "Source file caching disabled: creating new source file: {0}",
----------------
bulbazord wrote:
> This should be `if (debugger_sp` right? If `debugger_sp` is `false` (because it's nullptr) then you'll end up running `debugger_sp->GetUseSourceCache()` and die.
Yes, you're right. This should be `if(!debugger_sp || !debugger_sp->GetUseSourceCache())`


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

https://reviews.llvm.org/D153834



More information about the lldb-commits mailing list