[PATCH] D41874: [CodeView] Class record member counts should include base classes and virtual base classes

Brock Wyma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 12:39:32 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL324000: [CodeView] Class record member counts should include base classes and ... (authored by bwyma, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41874?vs=129131&id=132454#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41874

Files:
  llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  llvm/trunk/test/DebugInfo/COFF/types-data-members.ll
  llvm/trunk/test/DebugInfo/COFF/vftables.ll


Index: llvm/trunk/test/DebugInfo/COFF/vftables.ll
===================================================================
--- llvm/trunk/test/DebugInfo/COFF/vftables.ll
+++ llvm/trunk/test/DebugInfo/COFF/vftables.ll
@@ -117,11 +117,9 @@
 ; CHECK-NEXT:    }
 ; CHECK-NOT:     VFPtr
 
-; FIXME: Is the MemberCount correct?
-
 ; CHECK:        Struct ({{.*}}) {
 ; CHECK-NEXT:     TypeLeafKind: LF_STRUCTURE (0x1505)
-; CHECK-NEXT:     MemberCount: 3
+; CHECK-NEXT:     MemberCount: 5
 ; CHECK-NEXT:     Properties [ (0x200)
 ; CHECK-NEXT:       HasUniqueName (0x200)
 ; CHECK-NEXT:     ]
@@ -145,7 +143,7 @@
 
 ; CHECK:        Struct ({{.*}}) {
 ; CHECK-NEXT:     TypeLeafKind: LF_STRUCTURE (0x1505)
-; CHECK-NEXT:     MemberCount: 3
+; CHECK-NEXT:     MemberCount: 4
 ; CHECK-NEXT:     Properties [ (0x200)
 ; CHECK-NEXT:       HasUniqueName (0x200)
 ; CHECK-NEXT:     ]
Index: llvm/trunk/test/DebugInfo/COFF/types-data-members.ll
===================================================================
--- llvm/trunk/test/DebugInfo/COFF/types-data-members.ll
+++ llvm/trunk/test/DebugInfo/COFF/types-data-members.ll
@@ -298,7 +298,7 @@
 ; CHECK:   }
 ; CHECK:   Struct (0x1016) {
 ; CHECK:     TypeLeafKind: LF_STRUCTURE (0x1505)
-; CHECK:     MemberCount: 2
+; CHECK:     MemberCount: 4
 ; CHECK:     Properties [ (0x200)
 ; CHECK:       HasUniqueName (0x200)
 ; CHECK:     ]
Index: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -1970,13 +1970,15 @@
           VBTableIndex);
 
       ContinuationBuilder.writeMemberType(VBCR);
+      MemberCount++;
     } else {
       assert(I->getOffsetInBits() % 8 == 0 &&
              "bases must be on byte boundaries");
       BaseClassRecord BCR(translateAccessFlags(Ty->getTag(), I->getFlags()),
                           getTypeIndex(I->getBaseType()),
                           I->getOffsetInBits() / 8);
       ContinuationBuilder.writeMemberType(BCR);
+      MemberCount++;
     }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41874.132454.patch
Type: text/x-patch
Size: 2119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180201/f35c0839/attachment.bin>


More information about the llvm-commits mailing list