[Lldb-commits] [lldb] [lldb][SymbolFileDWARF] CompleteType: Lookup type in the declaration DIE's SymbolFile (PR #120569)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 20 04:13:35 PST 2024


Michael137 wrote:

> As an alternative, we might be able to make the die-to-type map shared between all symbol files in a debug map (similar to how "unique dwarf ast type map" is shared).

Yea I considered that, but I was concerned with the unforeseen complications this might have. Particularly I'm not sure how the `TypeSP` ownership should be managed. IIUC, a `TypeSP` is solely supposed to be owned by a single `SymbolFile` (`MakeType` kind of binds the two together). But then if we bundled `TypeSP`s from different modules into a single map on `SymbolFileDWARFDebugMap`, could we run into issues if one of the `SymbolFile`'s gets torn down (if that can happen)? Though I'm also not certain that we *only* store `TypeSP`s inside the `SymbolFileDWARF`. I don't think there's anything asserting/enforcing this.

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


More information about the lldb-commits mailing list