[Lldb-commits] [PATCH] D13942: Make SymbolFileDWARF::GetCachedSectionData thread safe

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 22 01:48:55 PDT 2015


labath accepted this revision.
labath added a comment.

The new version of the patch looks much cleaner than the old one. Thanks.


================
Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:641
@@ -669,3 +640,3 @@
 {
-    if (m_flags.IsClear (got_flag))
+    std::call_once(data_segment.m_flag, [this, sect_type, &data_segment]()
     {
----------------
shorter and probably more efficient:
`std::call_once(m_flag, &SFD::LoadSectionData, this, sect_type, std::ref(data_segment.m_data));`


http://reviews.llvm.org/D13942





More information about the lldb-commits mailing list