diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp index d90108f..36dee14 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp @@ -22,7 +22,6 @@  #include "lldb/Utility/Stream.h"  #include "lldb/Utility/Timer.h"  #include "lldb/lldb-private-enumerations.h" -#include "llvm/Support/FormatVariadic.h"  #include "llvm/Support/ThreadPool.h"  #include <atomic>  #include <optional> @@ -33,10 +32,10 @@ using namespace lldb_private::plugin::dwarf;  using namespace llvm::dwarf;  void ManualDWARFIndex::Index() { -  if (m_indexed) -    return; -  m_indexed = true; +  std::call_once(m_indexed_flag, [this]() { IndexImpl(); }); +} +void ManualDWARFIndex::IndexImpl() {    ElapsedTime elapsed(m_index_time);    LLDB_SCOPED_TIMERF("%p", static_cast<void *>(m_dwarf));    if (LoadFromCache()) {  | 
