Remove FIXME; we don't ever want to lay out empty bases.

llvm-svn: 119957
This commit is contained in:
Anders Carlsson 2010-11-22 00:03:08 +00:00
parent a7dd96ce77
commit 39a6b22023
1 changed files with 6 additions and 7 deletions

View File

@ -487,18 +487,17 @@ void CGRecordLayoutBuilder::LayoutUnion(const RecordDecl *D) {
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);