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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 27 02:31:48 PST 2017


labath added a comment.

I am only commenting on the c++14 stuff. I think all of the things you need here are available to us already through various llvm utilities. See inline comments for details.

For the "meat" of this patchset, I think clayborg is the only one who can do a proper review of that.



================
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;
 
----------------
Is `llvm::sys::RWMutex` what you need here?


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


================
Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h:505
+    // C++14: atomic_size_t
+    size_t m_use_count = 0;
+
----------------
Will `std::atomic<size_t>`  not work?


https://reviews.llvm.org/D40474





More information about the lldb-commits mailing list