summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2010-12-04 09:14:42 +0000
committerFrancois Pichet <pichet2000@gmail.com>2010-12-04 09:14:42 +0000
commitd583da04d09729aee882b3a7551325d311aac677 (patch)
tree6f07d475ebb937ded45bd3df16ea66f89a756020 /clang/lib/CodeGen/CGObjC.cpp
parent211e699754cc23a2a634cfcd818e532f5c8c5d06 (diff)
downloadbcm5719-llvm-d583da04d09729aee882b3a7551325d311aac677.tar.gz
bcm5719-llvm-d583da04d09729aee882b3a7551325d311aac677.zip
More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:
struct X { X() : au_i1(123) {} union { int au_i1; float au_f1; }; }; clang will now deal with au_i1 explicitly as an IndirectFieldDecl. llvm-svn: 120900
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index a8acb2b72ff..b7a6224000c 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -432,7 +432,7 @@ void CodeGenFunction::GenerateObjCCtorDtorMethod(ObjCImplementationDecl *IMP,
if (ctor) {
for (unsigned I = 0, E = IvarInitializers.size(); I != E; ++I) {
CXXBaseOrMemberInitializer *IvarInit = IvarInitializers[I];
- FieldDecl *Field = IvarInit->getMember();
+ FieldDecl *Field = IvarInit->getAnyMember();
QualType FieldType = Field->getType();
ObjCIvarDecl *Ivar = cast<ObjCIvarDecl>(Field);
LValue LV = EmitLValueForIvar(TypeOfSelfObject(),
@@ -448,7 +448,7 @@ void CodeGenFunction::GenerateObjCCtorDtorMethod(ObjCImplementationDecl *IMP,
} else {
// dtor
for (size_t i = IvarInitializers.size(); i > 0; --i) {
- FieldDecl *Field = IvarInitializers[i - 1]->getMember();
+ FieldDecl *Field = IvarInitializers[i - 1]->getAnyMember();
QualType FieldType = Field->getType();
const ConstantArrayType *Array =
getContext().getAsConstantArrayType(FieldType);
OpenPOWER on IntegriCloud