[ms-abi] Refactor Microsoft Record Layout
authorWarren Hunt <whunt@google.com>
Thu, 9 Jan 2014 00:30:56 +0000 (00:30 +0000)
committerWarren Hunt <whunt@google.com>
Thu, 9 Jan 2014 00:30:56 +0000 (00:30 +0000)
commitd640d7d96e93f138e1aa844d91c868485a6b113d
treedd1de46e0a7bfeddd1ba5f7c045a817e986d1b2d
parentd2d23ed04a08eb04ef2d6d0a89284f1f510e9d96
[ms-abi] Refactor Microsoft Record Layout

This patch refactors microsoft record layout to be more "natural".  The
most dominant change is that vbptrs and vfptrs are injected after the
fact.  This simplifies the implementation and the math for the offest
for the first base/field after the vbptr.

llvm-svn: 198818
24 files changed:
clang/include/clang/AST/CharUnits.h
clang/include/clang/AST/RecordLayout.h
clang/lib/AST/RecordLayout.cpp
clang/lib/AST/RecordLayoutBuilder.cpp
clang/lib/CodeGen/CGExprCXX.cpp
clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
clang/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
clang/test/CodeGenCXX/virtual-base-cast.cpp
clang/test/Layout/ms-x86-alias-avoidance-padding.cpp
clang/test/Layout/ms-x86-aligned-tail-padding.cpp
clang/test/Layout/ms-x86-basic-layout.cpp
clang/test/Layout/ms-x86-bitfields-vbases.cpp
clang/test/Layout/ms-x86-empty-base-after-base-with-vbptr.cpp
clang/test/Layout/ms-x86-empty-nonvirtual-bases.cpp
clang/test/Layout/ms-x86-empty-virtual-base.cpp
clang/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp
clang/test/Layout/ms-x86-misalignedarray.cpp
clang/test/Layout/ms-x86-pack-and-align.cpp
clang/test/Layout/ms-x86-primary-bases.cpp
clang/test/Layout/ms-x86-size-alignment-fail.cpp
clang/test/Layout/ms-x86-vfvb-alignment.cpp
clang/test/Layout/ms-x86-vfvb-sharing.cpp
clang/test/Layout/ms-x86-vtordisp.cpp