[Lldb-commits] [PATCH] D40474: DWZ 11/12: Main functionality

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 27 03:01:03 PST 2017

jankratochvil added a comment.

Going to update the patch.

Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h:92
   // C++14: mutable std::shared_timed_mutex m_dwz_uniq_mutex;
   mutable std::recursive_mutex m_dwz_uniq_mutex;
labath wrote:
> Is `llvm::sys::RWMutex` what you need here?
Yes, `llvm::sys::RWMutex` should do the trick, thanks.

Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h:487
+  public:
+    // C++14: Use heterogenous lookup.
+    DWZCommonFile(const lldb_private::FileSpec &filespec_ref);
labath wrote:
> Have you looked at llvm::DenseSet? It already supports heterogenous lookup( `find_as(...)`). It can also be more efficient than unordered_set.
`llvm::DenseSet` should do the trick, thanks.

Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h:505
+    // C++14: atomic_size_t
+    size_t m_use_count = 0;
labath wrote:
> Will `std::atomic<size_t>`  not work?
Yes, `std::atomic_size_t` would work but it currently has no benefit (rather a needless overhead) there without read/write locks, the atomicity makes sense if it is read-locked only.  With `llvm::sys::RWMutex` now I will use the atomic type.


More information about the lldb-commits mailing list