summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrock Wyma <brock.wyma@intel.com>2018-02-01 20:37:38 +0000
committerBrock Wyma <brock.wyma@intel.com>2018-02-01 20:37:38 +0000
commit4536c1f5695be17d31d2f73556c2c06f30e4f4eb (patch)
tree511f788865c548fa7f0d55a18ed625533e01716a
parent351e9f3a739d8609048c3406b1bc7ddc90e0d391 (diff)
downloadbcm5719-llvm-4536c1f5695be17d31d2f73556c2c06f30e4f4eb.tar.gz
bcm5719-llvm-4536c1f5695be17d31d2f73556c2c06f30e4f4eb.zip
[CodeView] Class record member counts should include base classes and ...
Increment the field list member count for base classes and virtual base classes. Differential Revision: https://reviews.llvm.org/D41874 llvm-svn: 324000
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp2
-rw-r--r--llvm/test/DebugInfo/COFF/types-data-members.ll2
-rw-r--r--llvm/test/DebugInfo/COFF/vftables.ll6
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index e616b6341c5..f1749fb6915 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -1970,6 +1970,7 @@ CodeViewDebug::lowerRecordFieldList(const DICompositeType *Ty) {
VBTableIndex);
ContinuationBuilder.writeMemberType(VBCR);
+ MemberCount++;
} else {
assert(I->getOffsetInBits() % 8 == 0 &&
"bases must be on byte boundaries");
@@ -1977,6 +1978,7 @@ CodeViewDebug::lowerRecordFieldList(const DICompositeType *Ty) {
getTypeIndex(I->getBaseType()),
I->getOffsetInBits() / 8);
ContinuationBuilder.writeMemberType(BCR);
+ MemberCount++;
}
}
diff --git a/llvm/test/DebugInfo/COFF/types-data-members.ll b/llvm/test/DebugInfo/COFF/types-data-members.ll
index 275af969a48..be8386b6543 100644
--- a/llvm/test/DebugInfo/COFF/types-data-members.ll
+++ b/llvm/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: ]
diff --git a/llvm/test/DebugInfo/COFF/vftables.ll b/llvm/test/DebugInfo/COFF/vftables.ll
index ebb64738143..ba6d9d5f40c 100644
--- a/llvm/test/DebugInfo/COFF/vftables.ll
+++ b/llvm/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: ]
OpenPOWER on IntegriCloud