r198818 - [ms-abi] Refactor Microsoft Record Layout

Hans Wennborg hans at chromium.org
Thu Jan 9 14:39:35 PST 2014

Hi Warren,

On Wed, Jan 8, 2014 at 4:30 PM, Warren Hunt <whunt at google.com> wrote:
> Author: whunt
> Date: Wed Jan  8 18:30:56 2014
> New Revision: 198818
> URL: http://llvm.org/viewvc/llvm-project?rev=198818&view=rev
> Log:
> [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.

This causes me to hit the following assertion when compiling C code in
MS ABI mode:

Assertion failed: CXXInfo && "Record layout does not have C++ specific
info!", file ..\tools\clang\include\clang/AST/RecordLayout.h, line 195

For example, the code below compiled with "clang -cc1 -cxx-abi
microsoft -triple i686-pc-win32" triggers the assert:

struct SubStruct {
  short X, Y;

struct Quad {
  int w;
  struct SubStruct SS;
  struct SubStruct *SSP;
  char c;
  int y;

static int F0(struct Quad Q) {
  return Q.SS.Y;

More information about the cfe-commits mailing list