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/Target/X86/X86InstrFMA3Info.cpp | |
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/Target/X86/X86InstrFMA3Info.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrFMA3Info.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrFMA3Info.cpp b/llvm/lib/Target/X86/X86InstrFMA3Info.cpp index cb1629ab60f..00ef65cdb6b 100644 --- a/llvm/lib/Target/X86/X86InstrFMA3Info.cpp +++ b/llvm/lib/Target/X86/X86InstrFMA3Info.cpp @@ -23,7 +23,7 @@ using namespace llvm; /// This flag is used in the method llvm::call_once() used below to make the /// initialization of the map 'OpcodeToGroup' thread safe. -LLVM_DEFINE_ONCE_FLAG(InitGroupsOnceFlag); +static llvm::once_flag InitGroupsOnceFlag; static ManagedStatic<X86InstrFMA3Info> X86InstrFMA3InfoObj; X86InstrFMA3Info *X86InstrFMA3Info::getX86InstrFMA3Info() { |