From: Argyrios Kyrtzidis Date: Tue, 17 May 2011 02:17:52 +0000 (+0000) Subject: Revert r131447, see if it fixes the buildbot. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5f18f3e8c3f1e9cb25534f9a9676f112bedc2a7;p=clang Revert r131447, see if it fixes the buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131450 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 3c18b0b108..bc2472cebb 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -128,9 +128,12 @@ static bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { if (RD->hasFlexibleArrayMember()) return false; - // If this is a C++ record, check if it is empty. + // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) - return CXXRD->isEmpty(); + for (CXXRecordDecl::base_class_const_iterator i = CXXRD->bases_begin(), + e = CXXRD->bases_end(); i != e; ++i) + if (!isEmptyRecord(Context, i->getType(), true)) + return false; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i)