Satisfy C++ aliasing rules, per suggestion by Chandler.
[oota-llvm.git] / lib / Support / ThreadLocal.cpp
index 1030a2b97db4694b1028c6bfccb3c01f41a9fb81..17e0fe15b020f48be65d4351e3a1c7f6b4c406d6 100644 (file)
@@ -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);