From c6dc4d75fd05d807c8c1a7fc81f9f02b649fed3b 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. llvm-svn: 158346 --- llvm/lib/Support/ThreadLocal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/ThreadLocal.cpp') diff --git a/llvm/lib/Support/ThreadLocal.cpp b/llvm/lib/Support/ThreadLocal.cpp index 1030a2b97db..17e0fe15b02 100644 --- a/llvm/lib/Support/ThreadLocal.cpp +++ b/llvm/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