summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-02-06 17:55:02 +0000
committerKamil Rytarowski <n54@gmx.com>2017-02-06 17:55:02 +0000
commitc5f28e2a05f2ebff09e1cd02a5faa84369c5c655 (patch)
tree2b060755745a90c26bf922b6baca662106b581cd /lldb/source/Plugins/Process/MacOSX-Kernel
parentd3464bf9adc283bd5f75756bf99074f195117509 (diff)
downloadbcm5719-llvm-c5f28e2a05f2ebff09e1cd02a5faa84369c5c655.tar.gz
bcm5719-llvm-c5f28e2a05f2ebff09e1cd02a5faa84369c5c655.zip
Switch std::call_once to llvm::call_once
Summary: The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms. This change is required in the NetBSD LLDB port. std::call_once with libstdc++ results with crashing the debugger. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, emaste, mehdi_amini, clayborg Reviewed By: labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29288 llvm-svn: 294202
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index a757bba70d1..121418dad5d 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -39,6 +39,8 @@
#include "lldb/Target/Thread.h"
#include "lldb/Utility/StringExtractor.h"
+#include "llvm/Support/Threading.h"
+
#define USEC_PER_SEC 1000000
// Project includes
@@ -718,9 +720,9 @@ Error ProcessKDP::DoSignal(int signo) {
}
void ProcessKDP::Initialize() {
- static std::once_flag g_once_flag;
+ static llvm::once_flag g_once_flag;
- std::call_once(g_once_flag, []() {
+ llvm::call_once(g_once_flag, []() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(), CreateInstance,
DebuggerInitialize);
OpenPOWER on IntegriCloud