kwk added a comment. Overall looks good to me except for one larger logic change. Maybe a your comment can clarify this. The code was in a very bad shape before, given the countless amounts of shortcuts you could take.
================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2014 - if (!method_die_offsets.empty()) { - DWARFDebugInfo &debug_info = dwarf->DebugInfo(); ---------------- I assume this can be removed because you're iterating over `num_matches == 0` when it's empty. But I cannot tell about the `DWARFDebugInfo &debug_info = dwarf->DebugInfo();` and how costly this call is and if it makes sense to run when the offsets are empty. ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp:524 DIEInfoArray die_info_array; - if (FindByName(name, die_info_array)) - DWARFMappedHash::ExtractDIEArray(die_info_array, die_offsets); + FindByName(name, die_info_array); + DWARFMappedHash::ExtractDIEArray(die_info_array, die_offsets); ---------------- Why is the `if` no longer needed? ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2061 + if (!die) { + m_index->ReportInvalidDIERef(die_ref, name.GetStringRef()); + continue; ---------------- Nice shortcut. ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2943 + // Make sure the decl contexts match all the way up + if (dwarf_decl_ctx != type_dwarf_decl_ctx) + continue; ---------------- This looks like a logic change and I wonder if it should go in a separate patch, maybe? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77326/new/ https://reviews.llvm.org/D77326 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits