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

Zequan Wu via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 19 10:59:25 PST 2024


ZequanWu wrote:

> In which case, GetDIEToType().lookup(decl_die) will return a nullptr. This is already a bit iffy because some of the surrounding code assumes we don't call CompleteTypeFromDWARF with a nullptr Type*. E.g., CompleteEnumType blindly dereferences it (though enums will never encounter this because their definition is fetched in ParseEnum, unlike for structures).

Should we bail out early if the Type* is null and return false to tell `SymbolFileDWARFDebugMap::CompleteType` that it can not complete this type and let it iterate to the symbol file that has the entry in its map.

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


More information about the lldb-commits mailing list