[Lldb-commits] [PATCH] D66566: [lldb] Replace std::once_flag with llvm::once_flag.

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 21 16:35:49 PDT 2019


davide created this revision.
davide added reviewers: jasonmolenda, friss.
Herald added a project: LLDB.

The former seems like it's not working on some platforms.
All the other uses use `llvm::`, so, let's change for consistency.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66566

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


Index: lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
===================================================================
--- lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
+++ lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
@@ -46,7 +46,7 @@
     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, [] {
Index: lldb/include/lldb/Target/Process.h
===================================================================
--- lldb/include/lldb/Target/Process.h
+++ lldb/include/lldb/Target/Process.h
@@ -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 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66566.216521.patch
Type: text/x-patch
Size: 1301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190821/c9dee9f7/attachment.bin>


More information about the lldb-commits mailing list