[Lldb-commits] [PATCH] D40470: Protect DWARFCompileUnit::m_die_array by a new mutex

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 29 23:40:09 PDT 2018


clayborg added a comment.

I think we should expose the llvm::sys::RWMutex and lets clients like BuildAddressRangeTable and SymbolFileDWARF::Index use it and get rid of m_die_array_usecount all together.



================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.h:181
+  // ExtractDIEsIfNeeded() will keep m_die_array populated forever.
+  uint32_t m_die_array_usecount = 0;
   // GetUnitDIEPtrOnly() needs to return pointer to the first DIE.
----------------
Why don't we expose the llvm::sys::RWMutex for BuildAddressRangeTable and SymbolFileDWARF::Index? Then they can just grab the read lock?


https://reviews.llvm.org/D40470





More information about the lldb-commits mailing list