Skip to content
Permalink
Browse files

[lldb] Replace std::call_once() with llvm::call_once()

Remove the single instance of std::call_once() in lldbTarget library
with llvm::call_once().  The former fails to build on NetBSD when
combined with llvm::once_flag (which replaced std::once_flag
in r369618), and combining the two is probably generally incorrect
anyway.

llvm-svn: 370748
  • Loading branch information...
mgorny committed Sep 3, 2019
1 parent 489cc58 commit 3276fffc170037dbb5cf9df41bfcdf62d4fc318b
Showing with 2 additions and 2 deletions.
  1. +2 −2 lldb/source/Target/Process.cpp
@@ -5965,7 +5965,7 @@ UtilityFunction *Process::GetLoadImageUtilityFunction(
llvm::function_ref<std::unique_ptr<UtilityFunction>()> factory) {
if (platform != GetTarget().GetPlatform().get())
return nullptr;
std::call_once(m_dlopen_utility_func_flag_once,
[&] { m_dlopen_utility_func_up = factory(); });
llvm::call_once(m_dlopen_utility_func_flag_once,
[&] { m_dlopen_utility_func_up = factory(); });
return m_dlopen_utility_func_up.get();
}

0 comments on commit 3276fff

Please sign in to comment.
You can’t perform that action at this time.