diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-11 18:49:54 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-11 18:49:54 +0000 |
commit | b2197042b8bbed9287957d4c21dbe8f53deb6007 (patch) | |
tree | 726798c8e88e730689893b5a735fabc6a32e6399 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | d362857f4c93e35d1729d9c31e73dbc9ab500096 (diff) | |
download | bcm5719-llvm-b2197042b8bbed9287957d4c21dbe8f53deb6007.tar.gz bcm5719-llvm-b2197042b8bbed9287957d4c21dbe8f53deb6007.zip |
ir-gen support for anonymous union data member
copying in copy constructors and used in
default constructor's initializer list.
llvm-svn: 78700
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 59f44de26ad..a642de9a464 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -699,14 +699,14 @@ void CodeGenModule::DeferredCopyConstructorToEmit(GlobalDecl CopyCtorDecl) { for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(), FieldEnd = ClassDecl->field_end(); Field != FieldEnd; ++Field) { - assert(!(*Field)->isAnonymousStructOrUnion() && - "FIXME. Anonymous union NYI - DeferredCopyConstructorToEmit"); QualType FieldType = Context.getCanonicalType((*Field)->getType()); if (const ArrayType *Array = Context.getAsArrayType(FieldType)) FieldType = Array->getElementType(); if (const RecordType *FieldClassType = FieldType->getAs<RecordType>()) { + if ((*Field)->isAnonymousStructOrUnion()) + continue; CXXRecordDecl *FieldClassDecl - = cast<CXXRecordDecl>(FieldClassType->getDecl()); + = cast<CXXRecordDecl>(FieldClassType->getDecl()); if (CXXConstructorDecl *FieldCopyCtor = FieldClassDecl->getCopyConstructor(Context, 0)) GetAddrOfCXXConstructor(FieldCopyCtor, Ctor_Complete); |