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
This commit is contained in:
Argyrios Kyrtzidis
2012-06-12 01:06:16 +00:00
parent 138c2b4e8a
commit 3e61374295
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
namespace llvm {
using namespace sys;
ThreadLocalImpl::ThreadLocalImpl() : data(0) {
ThreadLocalImpl::ThreadLocalImpl() : data() {
typedef int SIZE_TOO_BIG[sizeof(DWORD) <= sizeof(data) ? 1 : -1];
DWORD* tls = reinterpret_cast<DWORD*>(&data);
*tls = TlsAlloc();