diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-02 13:10:45 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-02 13:10:45 +0000 |
commit | cf01800b1f5cae211f1a7685f5d21ba26c74b52b (patch) | |
tree | f0c340e9f9abd034bf97cf1f38084e11db749d8f /llvm/lib/Support/ThreadLocal.cpp | |
parent | 7bc33bf934777a580977cd0dd7757795f41e6b57 (diff) | |
download | bcm5719-llvm-cf01800b1f5cae211f1a7685f5d21ba26c74b52b.tar.gz bcm5719-llvm-cf01800b1f5cae211f1a7685f5d21ba26c74b52b.zip |
[C++11] Replace LLVM_STATIC_ASSERT with static_assert, we now have
access to it on all host toolchains.
llvm-svn: 202642
Diffstat (limited to 'llvm/lib/Support/ThreadLocal.cpp')
-rw-r--r-- | llvm/lib/Support/ThreadLocal.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/ThreadLocal.cpp b/llvm/lib/Support/ThreadLocal.cpp index 38ab29b7ffe..aebbcad25cd 100644 --- a/llvm/lib/Support/ThreadLocal.cpp +++ b/llvm/lib/Support/ThreadLocal.cpp @@ -27,7 +27,7 @@ using namespace sys; ThreadLocalImpl::ThreadLocalImpl() : data() { } ThreadLocalImpl::~ThreadLocalImpl() { } void ThreadLocalImpl::setInstance(const void* d) { - LLVM_STATIC_ASSERT(sizeof(d) <= sizeof(data), "size too big"); + static_assert(sizeof(d) <= sizeof(data), "size too big"); void **pd = reinterpret_cast<void**>(&data); *pd = const_cast<void*>(d); } @@ -51,7 +51,7 @@ namespace llvm { using namespace sys; ThreadLocalImpl::ThreadLocalImpl() : data() { - LLVM_STATIC_ASSERT(sizeof(pthread_key_t) <= sizeof(data), "size too big"); + static_assert(sizeof(pthread_key_t) <= sizeof(data), "size too big"); pthread_key_t* key = reinterpret_cast<pthread_key_t*>(&data); int errorcode = pthread_key_create(key, NULL); assert(errorcode == 0); |