shafik added inline comments.
================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp:70 const dw_tag_t die_tag = die_info_array[i].tag; - if (die_tag != 0 && die_tag != DW_TAG_class_type && - die_tag != DW_TAG_structure_type) + if (!(die_tag == 0 || die_tag == DW_TAG_class_type || + die_tag == DW_TAG_structure_type)) ---------------- I also feel like the previous version was more readable. Is there another gain that I am missing? ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2065 - case DW_TAG_variable: { - auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU()); - if (!dwarf_cu) - continue; - sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu); - - if (parent_decl_ctx) { - if (DWARFASTParser *dwarf_ast = GetDWARFParser(*die.GetCU())) { - CompilerDeclContext actual_parent_decl_ctx = - dwarf_ast->GetDeclContextContainingUIDFromDWARF(die); - if (!actual_parent_decl_ctx || - actual_parent_decl_ctx != parent_decl_ctx) - continue; - } - } + switch (die.Tag()) { + default: ---------------- This whole switch feels overly clever, how about: ``` if (die.Tag() != DW_TAG_variable) continue; ``` 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