diff options
author | daquexian <daquexian566@gmail.com> | 2020-11-17 17:29:43 -0800 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2020-11-17 17:51:53 -0800 |
commit | 6bfb4120ead7d7503f079960d7f98eacdf0be03a (patch) | |
tree | a5441cc7273148f882af4118a43280806581950d /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 5834996fefc937d6211dc8c8a5b200068753391a (diff) | |
download | llvm-6bfb4120ead7d7503f079960d7f98eacdf0be03a.zip llvm-6bfb4120ead7d7503f079960d7f98eacdf0be03a.tar.gz llvm-6bfb4120ead7d7503f079960d7f98eacdf0be03a.tar.bz2 |
set the alignment of mlir::AttributeStorage to 64 bit explicitly to fix 32 bit platform
On some platform (like WebAssembly), alignof(mlir::AttributeStorage) is 4 instead of 8. As a result, it makes the program crashes since PointerLikeTypeTraits<mlir::Attribute>::NumLowBitsAvailable is 3.
So I explicitly set the alignment of mlir::AttributeStoarge to 64 bits, and set PointerLikeTypeTraits<mlir::Attribute>::NumLowBitsAvailable according to it.
I also fixed an another related error (alignof(NamedAttribute) -> alignof(DictionaryAttributeStorage)) based on reviewer's comments.
Reviewed By: dblaikie, rriddle
Differential Revision: https://reviews.llvm.org/D91062
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions