]> granicus.if.org Git - clang/commitdiff
Revert r131447, see if it fixes the buildbot.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 17 May 2011 02:17:52 +0000 (02:17 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 17 May 2011 02:17:52 +0000 (02:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131450 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp

index 3c18b0b10836e8a462efb2ceb8aa6d9f1344d8ea..bc2472cebbeb8106c0c68877ea9c39e449e42c5c 100644 (file)
@@ -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<CXXRecordDecl>(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)