X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FThreadLocal.h;h=1a0a00fd515fb06904078b771d48de5b0b40e86a;hp=15350a7afff7e6544b526b5217c4edb53a779876;hb=793537d21f8aa46458a5733d96816ba8bddeef50;hpb=0eb3a3524e9d68642e574780d19c781386ed4469 diff --git a/include/llvm/Support/ThreadLocal.h b/include/llvm/Support/ThreadLocal.h index 15350a7afff..1a0a00fd515 100644 --- a/include/llvm/Support/ThreadLocal.h +++ b/include/llvm/Support/ThreadLocal.h @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_THREAD_LOCAL_H #include "llvm/Support/Threading.h" +#include "llvm/Support/DataTypes.h" #include namespace llvm { @@ -22,7 +23,12 @@ namespace llvm { // ThreadLocalImpl - Common base class of all ThreadLocal instantiations. // YOU SHOULD NEVER USE THIS DIRECTLY. class ThreadLocalImpl { - void* data; + typedef uint64_t ThreadLocalDataTy; + /// \brief Platform-specific thread local data. + /// + /// This is embedded in the class and we avoid malloc'ing/free'ing it, + /// to make this class more safe for use along with CrashRecoveryContext. + ThreadLocalDataTy data; public: ThreadLocalImpl(); virtual ~ThreadLocalImpl();