From 3e61374295693beb0a899af44ccf4b5085dffbf3 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 12 Jun 2012 01:06:16 +0000 Subject: 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 --- lib/Support/ThreadLocal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Support/ThreadLocal.cpp') 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(&data); int errorcode = pthread_key_create(key, NULL); -- cgit v1.2.3