diff options
author | Reid Kleckner <rnk@google.com> | 2016-12-13 19:48:32 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-12-13 19:48:32 +0000 |
commit | 06df402b066162ef819e65d92d0d729bb9cbf13d (patch) | |
tree | c3d7f8a86f73e8d2d092cac0e2a5defc8c15c118 /clang/lib/AST/ExprConstant.cpp | |
parent | ad90369a940539e3f09acafb661b070ebfd1a559 (diff) | |
download | bcm5719-llvm-06df402b066162ef819e65d92d0d729bb9cbf13d.tar.gz bcm5719-llvm-06df402b066162ef819e65d92d0d729bb9cbf13d.zip |
Align EvalInfo in ExprConstant to avoid PointerUnion assertions
32-bit MSVC doesn't provide more than 4 byte stack alignment by default.
This conflicts with PointerUnion's attempt to make assertions about
alignment. This fixes the problem by explicitly asking the compiler for
8 byte alignment.
llvm-svn: 289575
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 61bb2b9bc91..e18caffc5af 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -433,7 +433,7 @@ namespace { /// rules. For example, the RHS of (0 && foo()) is not evaluated. We can /// evaluate the expression regardless of what the RHS is, but C only allows /// certain things in certain situations. - struct EvalInfo { + struct LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) EvalInfo { ASTContext &Ctx; /// EvalStatus - Contains information about the evaluation. |