[Lldb-commits] [PATCH] D40470: DWZ 03/07: Protect DWARFCompileUnit::m_die_array by a new mutex

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 30 10:19:48 PDT 2018


clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:56
+    return 0;
+  std::shared_ptr<void> m_die_array_size_atomic_set(nullptr,
+      [&](void*){ m_die_array_size_atomic = m_die_array.size(); });
----------------
Remove the "m_" prefix on this local variable as that indicates it is a member variable. 

Might be better to use CleanUp utility from "lldb/Utility/CleanUp.h" instead of a shared pointer to void? Took me a bit to figure out what this was doing. If this is a very accepted C++ way to run a function that is scoped that is fine, but it seems a little unclear what this was doing initially.



https://reviews.llvm.org/D40470





More information about the lldb-commits mailing list