This is an archive of the discontinued LLVM Phabricator instance.

[CodeView] Class record member counts should include base classes and virtual base classes
ClosedPublic

Authored by bwyma on Jan 9 2018, 11:40 AM.

Details

Summary

As the FIXME in vftables.ll suggests the member count for class records is incorrect. The member count should also include the base classes and virtual base classes present in the field list to match what Visual Studio is doing.

`

FieldList (0x1018) {
  TypeLeafKind: LF_FIELDLIST (0x1203)
  BaseClass { ... }             # 1
  BaseClass { ... }             # 2
  DataMember { ... }            # 3
  OneMethod { ... }             # 4     
  OneMethod { ... }             # 5
} 
Struct (0x1019) { 
  TypeLeafKind: LF_STRUCTURE (0x1505) 
  MemberCount: 5                        # SHOULD BE "5", NOT "3"
  FieldList: <field list> (0x1018) 
  ...
}

`

Diff Detail

Repository
rL LLVM

Event Timeline

bwyma created this revision.Jan 9 2018, 11:40 AM
rnk accepted this revision.Jan 17 2018, 10:15 AM

lgtm

This revision is now accepted and ready to land.Jan 17 2018, 10:15 AM
This revision was automatically updated to reflect the committed changes.