For llvm::sys::ThreadLocalImpl instead of malloc'ing the platform-specific
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 12 Jun 2012 00:21:31 +0000 (00:21 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 12 Jun 2012 00:21:31 +0000 (00:21 +0000)
commit793537d21f8aa46458a5733d96816ba8bddeef50
tree441f269114a3f3b693c2f8fb15ad7fef979f2562
parent0eb3a3524e9d68642e574780d19c781386ed4469
For llvm::sys::ThreadLocalImpl instead of malloc'ing the platform-specific
thread local data, embed them in the class using a uint64_t and make sure
we get compiler errors if there's a platform where this is not big enough.

This makes ThreadLocal more safe for using it in conjunction with CrashRecoveryContext.

Related to crash in rdar://11434201.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158342 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/ThreadLocal.h
lib/Support/ThreadLocal.cpp
lib/Support/Windows/ThreadLocal.inc