]> granicus.if.org Git - clang/commit
Fix the layout of bitfields in ms_struct unions: their
authorJohn McCall <rjmccall@apple.com>
Wed, 19 Aug 2015 22:42:36 +0000 (22:42 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 19 Aug 2015 22:42:36 +0000 (22:42 +0000)
commit0cfc51eb0988aea7ba89f838d32872d6d3f98428
tree0cb9e8a64bf3d32438a39b6950e44b6a09bcd2c0
parentaba36813fb59f195d9d6ce0ce1836f370e62b1ab
Fix the layout of bitfields in ms_struct unions: their
alignment is ignored, and they always allocate a complete
storage unit.

Also, change the dumping of AST record layouts: use the more
readable C++-style dumping even in C, include bitfield offset
information in the dump, and don't print sizeof/alignof
information for fields of record type, since we don't do so
for bases or other kinds of field.

rdar://22275433

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245514 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/AST/RecordLayoutBuilder.cpp
test/CodeGen/ms_struct-pack.c
test/CodeGen/override-layout.c
test/Layout/itanium-union-bitfield.cpp
test/Layout/ms-x86-alias-avoidance-padding.cpp
test/Layout/ms-x86-bitfields-vbases.cpp
test/Layout/ms-x86-empty-layout.c
test/Layout/ms-x86-empty-nonvirtual-bases.cpp
test/Layout/ms-x86-empty-virtual-base.cpp
test/Layout/ms-x86-pack-and-align.cpp
test/Layout/ms_struct-bitfields.c [new file with mode: 0644]
test/Sema/ms_bitfield_layout.c
test/Sema/ms_class_layout.cpp