diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-06-12 01:06:16 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-06-12 01:06:16 +0000 |
commit | 3e61374295693beb0a899af44ccf4b5085dffbf3 (patch) | |
tree | 2e204d9a4b6ff9550d347e43be541c3b29d5a46b /lib/Support/ThreadLocal.cpp | |
parent | 138c2b4e8a4480f4d956980b24c504c27e18cfc1 (diff) |
Satisfy C++ aliasing rules, per suggestion by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ThreadLocal.cpp')
-rw-r--r-- | lib/Support/ThreadLocal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ThreadLocal.cpp b/lib/Support/ThreadLocal.cpp index 1030a2b97d..17e0fe15b0 100644 --- a/lib/Support/ThreadLocal.cpp +++ b/lib/Support/ThreadLocal.cpp @@ -40,7 +40,7 @@ void ThreadLocalImpl::removeInstance() { data = 0; } namespace llvm { using namespace sys; -ThreadLocalImpl::ThreadLocalImpl() : data(0) { +ThreadLocalImpl::ThreadLocalImpl() : data() { typedef int SIZE_TOO_BIG[sizeof(pthread_key_t) <= sizeof(data) ? 1 : -1]; pthread_key_t* key = reinterpret_cast<pthread_key_t*>(&data); int errorcode = pthread_key_create(key, NULL); |