]> granicus.if.org Git - clang/commit
[MS-ABI] Fixed __declspec(align()) on bitfields under #pragma pack.
authorWarren Hunt <whunt@google.com>
Thu, 10 Apr 2014 22:15:18 +0000 (22:15 +0000)
committerWarren Hunt <whunt@google.com>
Thu, 10 Apr 2014 22:15:18 +0000 (22:15 +0000)
commit10b2c5623bb1383b42fa722d1de69a36bf018d65
tree67aaa449d64c0bb0af078bc412b220a3a9fa251f
parent5d6c2aba33cda6556f947411f557f4dbaee97512
[MS-ABI] Fixed __declspec(align()) on bitfields under #pragma pack.
When __declspec(align()) is applied to a bitfield it affects the
alignment rather than the required alignment of the struct.  The major
feature that this patch adds is that the alignment of the structure
obeys the alignment of __declspec(align()) from the bitfield over the
value specified in pragma pack.

Test cases are included.
The patch also includes some small cleanups in recordlayoutbuilder and
some cleanups to some lit tests, including line endings (but no
functionality change to lit tests)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205994 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/RecordLayoutBuilder.cpp
test/Layout/ms-x86-pack-and-align.cpp