From 60199c1a4da0dc52c1cae105254743659095360c Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 6 Feb 2017 19:30:59 +0000 Subject: [PATCH] Fix darwin build (llvm::once_flag fallout) llvm-svn: 294221 --- .../source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp | 1 + .../source/MacOSX/DarwinLog/DarwinLogCollector.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp index aecf9ae24d08..772b1f3c8977 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp @@ -24,6 +24,7 @@ #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/PseudoTerminal.h" #include "lldb/Utility/StreamString.h" +#include "llvm/Support/Threading.h" using namespace lldb; using namespace lldb_private; diff --git a/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp b/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp index 56033cc205d9..9c81851c4443 100644 --- a/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp +++ b/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp @@ -46,10 +46,10 @@ static os_activity_stream_set_event_handler_t s_os_activity_stream_set_event_handler; bool LookupSPICalls() { - static llvm::once_flag s_once_flag; + static std::once_flag s_once_flag; static bool s_has_spi; - llvm::call_once(s_once_flag, [] { + std::call_once(s_once_flag, [] { dlopen ("/System/Library/PrivateFrameworks/LoggingSupport.framework/LoggingSupport", RTLD_NOW); s_os_activity_stream_for_pid = (os_activity_stream_for_pid_t)dlsym( RTLD_DEFAULT, "os_activity_stream_for_pid");