[cfe-commits] r131447 - /cfe/trunk/lib/CodeGen/TargetInfo.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon May 16 17:46:40 PDT 2011


Author: akirtzidis
Date: Mon May 16 19:46:40 2011
New Revision: 131447

URL: http://llvm.org/viewvc/llvm-project?rev=131447&view=rev
Log:
Inside isEmptyRecord function, for CXXRecordDecl just check the isEmpty bit.

Modified:
    cfe/trunk/lib/CodeGen/TargetInfo.cpp

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=131447&r1=131446&r2=131447&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon May 16 19:46:40 2011
@@ -128,12 +128,9 @@
   if (RD->hasFlexibleArrayMember())
     return false;
 
-  // If this is a C++ record, check the bases first.
+  // If this is a C++ record, check if it is empty.
   if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
-    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;
+    return CXXRD->isEmpty();
 
   for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
          i != e; ++i)





More information about the cfe-commits mailing list