diff --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp index 6af5f38b5894d..0f3a90461f69e 100644 --- a/lldb/source/Host/common/Editline.cpp +++ b/lldb/source/Host/common/Editline.cpp @@ -1197,7 +1197,7 @@ Editline::Editline(const char *editline_name, FILE *input_file, if (term_fd != -1) { static std::mutex *g_init_terminal_fds_mutex_ptr = nullptr; static std::set *g_init_terminal_fds_ptr = nullptr; - static std::once_flag g_once_flag; + static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, [&]() { g_init_terminal_fds_mutex_ptr = new std::mutex(); // NOTE: Leak to avoid C++ destructor chain issues diff --git a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp index efc08033974c0..5d9a861ff16a9 100644 --- a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp +++ b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp @@ -863,7 +863,7 @@ static void LoadCoreMediaFormatters(TypeCategoryImplSP objc_category_sp) { } lldb::TypeCategoryImplSP ObjCLanguage::GetFormatters() { - static std::once_flag g_initialize; + static llvm::once_flag g_initialize; static TypeCategoryImplSP g_category; llvm::call_once(g_initialize, [this]() -> void { diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 9e66070b4cdf0..23ff55e542bfa 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -3593,7 +3593,7 @@ void ProcessGDBRemote::KillDebugserverProcess() { } void ProcessGDBRemote::Initialize() { - static std::once_flag g_once_flag; + static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, []() { PluginManager::RegisterPlugin(GetPluginNameStatic(), diff --git a/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp b/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp index a418587688c81..7b95983795530 100644 --- a/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp @@ -39,7 +39,7 @@ void ScriptInterpreterNone::ExecuteInterpreterLoop() { } void ScriptInterpreterNone::Initialize() { - static std::once_flag g_once_flag; + static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, []() { PluginManager::RegisterPlugin(GetPluginNameStatic(),