]> granicus.if.org Git - clang/commit
[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)
commit2085f1eed343a0e51310652195b5c2a037adbad4
treea7ba55f08cb86d5edafa66206eab8ebe1906e0f5
parentab9df2111d03d694cbbaa340f0f9cc6e04650fb6
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235976 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/TargetInfo.h
lib/Basic/TargetInfo.cpp
lib/Basic/Targets.cpp
lib/CodeGen/CodeGenModule.cpp
test/CodeGen/arm-bitfield-alignment.c [new file with mode: 0644]