diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-05-17 02:17:52 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-05-17 02:17:52 +0000 |
commit | d42411fa19e92ec57cf24a89b8a4e979c0468574 (patch) | |
tree | 79504ff80b0e67427c1841703e1d749eb5021a57 /clang/lib/CodeGen | |
parent | d915e16f708f2153609748465722375579174690 (diff) | |
download | bcm5719-llvm-d42411fa19e92ec57cf24a89b8a4e979c0468574.tar.gz bcm5719-llvm-d42411fa19e92ec57cf24a89b8a4e979c0468574.zip |
Revert r131447, see if it fixes the buildbot.
llvm-svn: 131450
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 3c18b0b1083..bc2472cebbe 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/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<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) |