[Lldb-commits] [lldb] [lldb] Fix source display for artificial locations (PR #115876)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 12 08:51:54 PST 2024


================
@@ -205,16 +205,20 @@ Disassembler::GetFunctionDeclLineEntry(const SymbolContext &sc) {
     return {};
 
   LineEntry prologue_end_line = sc.line_entry;
-  FileSpec func_decl_file;
+  SupportFileSP func_decl_file_sp;
----------------
JDevlieghere wrote:

As you've noticed, `SupportFileSP` is always valid in a few places (like in `LineEntry`). I don't think that's something that should generally hold (mostly because it's hard to enforce) so I would have done the same thing here. The alternative would be to initialize this to an empty `SupportFile` and have `GetStartLineSourceInfo` do the same instead of calling `::reset`, though I think that's pretty inefficient. Anyway, just an observation, no need to change anything. 

https://github.com/llvm/llvm-project/pull/115876


More information about the lldb-commits mailing list