]> granicus.if.org Git - clang/commitdiff
We'll also need a vtable pointer if we have virtual bases.
authorMike Stump <mrs@apple.com>
Thu, 30 Jul 2009 17:53:53 +0000 (17:53 +0000)
committerMike Stump <mrs@apple.com>
Thu, 30 Jul 2009 17:53:53 +0000 (17:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77610 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayoutBuilder.cpp

index a60a72b74fa4a2f29226c6030a8008ad1098e6c4..0ede5362c4ce78c8de19f4ca769944459f2578df 100644 (file)
@@ -25,7 +25,7 @@ ASTRecordLayoutBuilder::ASTRecordLayoutBuilder(ASTContext &Ctx)
   IsUnion(false), NonVirtualSize(0), NonVirtualAlignment(8) {}
 
 void ASTRecordLayoutBuilder::LayoutVtable(const CXXRecordDecl *RD) {
-  if (RD->isPolymorphic())
+  if (RD->isPolymorphic() || RD->getNumVBases())
     {
       assert (RD->getNumBases() == 0 && "no polymorphic inheritance yet");
       int AS = 0;