[lldb] Replace std::once_flag with llvm::once_flag.
authorDavide Italiano <davide@freebsd.org>
Thu, 22 Aug 2019 03:12:49 +0000 (03:12 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 22 Aug 2019 03:12:49 +0000 (03:12 +0000)
Summary:
The former seems like it's not working on some platforms.
All the other uses use `llvm::`, so, let's change for consistency.

Reviewers: jasonmolenda, friss

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D66566

llvm-svn: 369618

lldb/include/lldb/Target/Process.h
lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp

index a1c2580d5b1938e50c2447bae183680ea4f693a0..9bc9e4a7523f49806409b6466d4fc3b9603b4f6c 100644 (file)
@@ -50,6 +50,7 @@
 #include "lldb/lldb-private.h"
 
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/Support/Threading.h"
 #include "llvm/Support/VersionTuple.h"
 
 namespace lldb_private {
@@ -2741,7 +2742,7 @@ protected:
   enum { eCanJITDontKnow = 0, eCanJITYes, eCanJITNo } m_can_jit;
   
   std::unique_ptr<UtilityFunction> m_dlopen_utility_func_up;
-  std::once_flag m_dlopen_utility_func_flag_once;
+  llvm::once_flag m_dlopen_utility_func_flag_once;
 
   size_t RemoveBreakpointOpcodesFromBuffer(lldb::addr_t addr, size_t size,
                                            uint8_t *buf) const;
index be50f04c4d8cbc436f73486a79f1237381a52f6b..edbe2afdc8a76081b6f07ee201e37d1535b4dbbf 100644 (file)
@@ -46,7 +46,7 @@ static os_activity_stream_set_event_handler_t
     s_os_activity_stream_set_event_handler;
 
 bool LookupSPICalls() {
-  static std::once_flag s_once_flag;
+  static llvm::once_flag s_once_flag;
   static bool s_has_spi;
 
   std::call_once(s_once_flag, [] {