[cfe-commits] r119957 - /cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
Anders Carlsson
andersca at mac.com
Sun Nov 21 16:03:08 PST 2010
Author: andersca
Date: Sun Nov 21 18:03:08 2010
New Revision: 119957
URL: http://llvm.org/viewvc/llvm-project?rev=119957&view=rev
Log:
Remove FIXME; we don't ever want to lay out empty bases.
Modified:
cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp?rev=119957&r1=119956&r2=119957&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp Sun Nov 21 18:03:08 2010
@@ -487,18 +487,17 @@
void CGRecordLayoutBuilder::LayoutNonVirtualBase(const CXXRecordDecl *BaseDecl,
uint64_t BaseOffset) {
+ // Ignore empty bases.
+ if (BaseDecl->isEmpty())
+ return;
+
+ CheckZeroInitializable(BaseDecl);
+
const ASTRecordLayout &Layout =
Types.getContext().getASTRecordLayout(BaseDecl);
uint64_t NonVirtualSize = Layout.getNonVirtualSize();
- if (BaseDecl->isEmpty()) {
- // FIXME: Lay out empty bases.
- return;
- }
-
- CheckZeroInitializable(BaseDecl);
-
// FIXME: Actually use a better type than [sizeof(BaseDecl) x i8] when we can.
AppendPadding(BaseOffset / 8, 1);
More information about the cfe-commits
mailing list