[Lldb-commits] [PATCH] D73782: [lldb/DWARF] Don't hold a unique SymbolFileDWARFDwo in a DWARFUnit

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 31 10:36:04 PST 2020


clayborg added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp:56
+    return nullptr;
+  if (hash != cu->GetUnitDIEOnly().GetAttributeValueAsUnsigned(DW_AT_GNU_dwo_id, 0))
+    return nullptr;
----------------
How often does this function get called? Should we cache the DW_AT_GNU_dwo_id in the DWARFCompileUnit to avoid extracting the DW_AT_GNU_dwo_id attribute maybe multiple times? 


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h:67
   SymbolFileDWARF &GetBaseSymbolFile() { return m_base_symbol_file; }
 
+  DWARFCompileUnit *FindSingleCompileUnit();
----------------
Curious: what is a single compile unit? A bit of a comment in header doc here might be nice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73782/new/

https://reviews.llvm.org/D73782





More information about the lldb-commits mailing list