[ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase Layout

Press ? to show keyboard shortcuts.
Committed
whuntJan 9 2014, 3:51 PM
Parents
rL198899: Updating documentation for the __has_attribute changes landed in r198897.
Branches
Unknown
Tags
Unknown
Subscribers
None
Description

[ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase Layout

The MS abi lays out *all* non-virtual bases with leading vfptrs before
laying out non-virutal bases without vfptrs. This guarantees that the
primary base is laid out first. r198818 fixed RecordLayoutBuilder to
produce compatiable layouts. This patch fixes CGRecordLayoutBuilder to
be able to consume those layouts and produce meaningful output without
tripping any asserts about assumed incoming layout.

A test case is included that shows CGRecordLayoutBuilder in fact
produces output in the compatiable order.

rL198900

cfe/trunk/lib/AST/RecordLayoutBuilder.cpp

Loading...

cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp

Loading...

cfe/trunk/test/CodeGenCXX/microsoft-abi-non-virtual-base-ordering.cpp

Loading...

Add Comment