aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Support/ThreadLocal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Support/ThreadLocal.h b/include/llvm/Support/ThreadLocal.h
index 1a0a00f..2957034 100644
--- a/include/llvm/Support/ThreadLocal.h
+++ b/include/llvm/Support/ThreadLocal.h
@@ -28,7 +28,12 @@ namespace llvm {
///
/// 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;
+ union {
+ char data[sizeof(ThreadLocalDataTy)];
+ struct {
+ ThreadLocalDataTy align_data;
+ };
+ };
public:
ThreadLocalImpl();
virtual ~ThreadLocalImpl();