From a43456d7b94d940d83cca76d0e5a3198a77492d8 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Thu, 2 Feb 2017 16:06:33 +0000 Subject: [PATCH] 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 Reviewers: labath, emaste, joerg, clayborg, mehdi_amini Reviewed By: mehdi_amini Subscribers: chandlerc Differential Revision: https://reviews.llvm.org/D29296 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293902 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Threading.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/llvm/Support/Threading.h b/include/llvm/Support/Threading.h index 4bef7ec8dd3..e0001e33039 100644 --- a/include/llvm/Support/Threading.h +++ b/include/llvm/Support/Threading.h @@ -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 -- 2.50.1