[cfe-commits] r77612 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Mike Stump
mrs at apple.com
Thu Jul 30 11:01:45 PDT 2009
Author: mrs
Date: Thu Jul 30 13:01:44 2009
New Revision: 77612
URL: http://llvm.org/viewvc/llvm-project?rev=77612&view=rev
Log:
Update based upon comments. Explain why we have an assert.
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=77612&r1=77611&r2=77612&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Thu Jul 30 13:01:44 2009
@@ -82,13 +82,13 @@
UpdateAlignment(AA->getAlignment());
// If this is a C++ class, lay out the nonvirtual bases.
- if (Ctx.getLangOptions().CPlusPlus) {
- const CXXRecordDecl *RD = cast<CXXRecordDecl>(D);
+ if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
LayoutVtable(RD);
LayoutNonVirtualBases(RD);
assert (RD->getNumVBases() == 0
&& "FIXME: We don't support virtual bases yet!");
+ // FIXME: We need to layout the virtual bases in the complete object layout.
}
LayoutFields(D);
More information about the cfe-commits
mailing list