Make llvm::call_once more convenient to reuse out of LLVM

Summary:
Currently users need to set call `using namespace llvm;`, with this change it's no longer needed.

Sponsored by <The NetBSD Foundation>

Reviewers: labath, emaste, joerg, clayborg, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: chandlerc

Differential Revision: https://reviews.llvm.org/D29296

llvm-svn: 293902
This commit is contained in:
Kamil Rytarowski 2017-02-02 16:06:33 +00:00
parent 825221192f
commit 672c93f421
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ namespace llvm {
/// This macro is the only way you should define your once flag for LLVM's
/// call_once.
#define LLVM_DEFINE_ONCE_FLAG(flag) static once_flag flag = Uninitialized
#define LLVM_DEFINE_ONCE_FLAG(flag) \
static ::llvm::once_flag flag = ::llvm::Uninitialized
#endif