================ @@ -66,3 +67,41 @@ void Progress::ReportProgress() { m_debugger_id); } } + +ProgressManager &ProgressManager::InstanceImpl() { + static std::once_flag g_once_flag; + static ProgressManager *g_progress_manager = nullptr; + std::call_once(g_once_flag, []() { + // NOTE: known leak to avoid global destructor chain issues. + g_progress_manager = new ProgressManager(); + }); + return *g_progress_manager; +} ---------------- chelcassanova wrote:
I was actually going to ask if `Instance()` was still necessary given that all functionality was in `InstanceImpl()` (or if `InstanceImpl()` now needed to be public or something along those lines). If we're going to keep the implementation of the instance accessor this way then to my understanding we can inline `Instance()`. https://github.com/llvm/llvm-project/pull/81319 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits