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/CodeGen/TargetPassConfig.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/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 2788287ddc1..78c5334a654 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -733,7 +733,7 @@ MachinePassRegistry RegisterRegAlloc::Registry; /// A dummy default pass factory indicates whether the register allocator is /// overridden on the command line. -LLVM_DEFINE_ONCE_FLAG(InitializeDefaultRegisterAllocatorFlag); +static llvm::once_flag InitializeDefaultRegisterAllocatorFlag; static FunctionPass *useDefaultRegisterAllocator() { return nullptr; } static RegisterRegAlloc defaultRegAlloc("default", |