diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-02-05 21:13:06 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-02-05 21:13:06 +0000 |
commit | 5d2bd8dd54a5ed68ef5dc9cf2f496d6b8e588866 (patch) | |
tree | f7e4541508bff28b77d30ac611d987e156c65b8e /llvm/lib/Support | |
parent | 6a1d078560b4c6539f65bf6e8aeb757a27640bde (diff) | |
download | bcm5719-llvm-5d2bd8dd54a5ed68ef5dc9cf2f496d6b8e588866.tar.gz bcm5719-llvm-5d2bd8dd54a5ed68ef5dc9cf2f496d6b8e588866.zip |
Revamp llvm::once_flag to be closer to std::once_flag
Summary:
Make this interface reusable similarly to std::call_once and std::once_flag interface.
This makes porting LLDB to NetBSD easier as there was in the original approach a portable way to specify a non-static once_flag. With this change translating std::once_flag to llvm::once_flag is mechanical.
Sponsored by <The NetBSD Foundation>
Reviewers: mehdi_amini, labath, joerg
Reviewed By: mehdi_amini
Subscribers: emaste, clayborg
Differential Revision: https://reviews.llvm.org/D29566
llvm-svn: 294143
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/ManagedStatic.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/ManagedStatic.cpp b/llvm/lib/Support/ManagedStatic.cpp index 7dd31315f90..fb7cd070c42 100644 --- a/llvm/lib/Support/ManagedStatic.cpp +++ b/llvm/lib/Support/ManagedStatic.cpp @@ -21,7 +21,7 @@ using namespace llvm; static const ManagedStaticBase *StaticList = nullptr; static sys::Mutex *ManagedStaticMutex = nullptr; -LLVM_DEFINE_ONCE_FLAG(mutex_init_flag); +static llvm::once_flag mutex_init_flag; static void initializeMutex() { ManagedStaticMutex = new sys::Mutex(); |