Fix darwin build (llvm::once_flag fallout)

llvm-svn: 294221
This commit is contained in:
Pavel Labath 2017-02-06 19:30:59 +00:00
parent 62c3545e25
commit 60199c1a4d
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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");