summaryrefslogtreecommitdiff
path: root/lib/Support/ThreadLocal.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-12 01:06:16 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-12 01:06:16 +0000
commit3e61374295693beb0a899af44ccf4b5085dffbf3 (patch)
tree2e204d9a4b6ff9550d347e43be541c3b29d5a46b /lib/Support/ThreadLocal.cpp
parent138c2b4e8a4480f4d956980b24c504c27e18cfc1 (diff)
downloadllvm-3e61374295693beb0a899af44ccf4b5085dffbf3.tar.gz
llvm-3e61374295693beb0a899af44ccf4b5085dffbf3.tar.bz2
llvm-3e61374295693beb0a899af44ccf4b5085dffbf3.tar.xz
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.cpp2
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);