HomePhabricator

Revamp llvm::once_flag to be closer to std::once_flag

Authored by krytarowski on Feb 5 2017, 1:13 PM.

Description

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