[cfe-commits] r77610 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Mike Stump
mrs at apple.com
Thu Jul 30 10:53:54 PDT 2009
Author: mrs
Date: Thu Jul 30 12:53:53 2009
New Revision: 77610
URL: http://llvm.org/viewvc/llvm-project?rev=77610&view=rev
Log:
We'll also need a vtable pointer if we have virtual bases.
Modified:
cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=77610&r1=77609&r2=77610&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Thu Jul 30 12:53:53 2009
@@ -25,7 +25,7 @@
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;
More information about the cfe-commits
mailing list