diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-02-02 16:06:33 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-02-02 16:06:33 +0000 |
commit | 672c93f42147f0f995240eb6c8ffa18a2bb58ad0 (patch) | |
tree | 87a5575fa8aeb6a55f3f48f4de070a30e24b234d | |
parent | 825221192fc984b8a9cff144d43cfe6ec1055811 (diff) | |
download | bcm5719-llvm-672c93f42147f0f995240eb6c8ffa18a2bb58ad0.tar.gz bcm5719-llvm-672c93f42147f0f995240eb6c8ffa18a2bb58ad0.zip |
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
-rw-r--r-- | llvm/include/llvm/Support/Threading.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/Threading.h b/llvm/include/llvm/Support/Threading.h index 4bef7ec8dd3..e0001e33039 100644 --- a/llvm/include/llvm/Support/Threading.h +++ b/llvm/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 |