Michael137 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.
Just tried this. Unfortunately [we remove the CompilerType from the `GetForwardDeclCompilerTypeToDIE`](https://github.com/llvm/llvm-project/blob/d7ddc976d544528fe7f16882f5bec66c3b2a7884/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L1577) map inside of `CompleteType`. So in the next iteration of the `SymbolFileDWARFDebugMap::CompleteType` loop, it [won't ever call into `SymbolFileDWARF::CompleteType` again](https://github.com/llvm/llvm-project/blob/d7ddc976d544528fe7f16882f5bec66c3b2a7884/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp#L808) :( https://github.com/llvm/llvm-project/pull/120569 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits