[ARM/AArch64] Enforce alignment for bitfielded structs
authorBradley Smith <bradley.smith@arm.com>
Tue, 28 Apr 2015 11:24:54 +0000 (11:24 +0000)
committerBradley Smith <bradley.smith@arm.com>
Tue, 28 Apr 2015 11:24:54 +0000 (11:24 +0000)
commitba945626b094899c7a4cae587398a69097da560c
tree8999ff7481a090b491d669dc6bbcaeee21b32aeb
parent86e0249235f15fae19709e21b1ae250fd1f20ca0
[ARM/AArch64] Enforce alignment for bitfielded structs

When creating a global variable with a type of a struct with bitfields, we must
forcibly set the alignment of the global from the RecordDecl. We must do this so
that the proper bitfield alignment makes its way down to LLVM, since clang will
mangle the bitfields into one large type.

llvm-svn: 235976
clang/include/clang/Basic/TargetInfo.h
clang/lib/Basic/TargetInfo.cpp
clang/lib/Basic/Targets.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/arm-bitfield-alignment.c [new file with mode: 0644]