ir-gen support for nonfragile abi's synthesized ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68122 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 95c3c5f..422988d 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -705,6 +705,12 @@
const ObjCIvarDecl* Ivar = (*IVI);
NewEntry->LayoutField(Ivar, i++, false, StructPacking, *this);
}
+ // Also synthesized ivars
+ for (ObjCInterfaceDecl::prop_iterator I = D->prop_begin(),
+ E = D->prop_end(); I != E; ++I) {
+ if (ObjCIvarDecl *Ivar = (*I)->getPropertyIvarDecl())
+ NewEntry->LayoutField(Ivar, i++, false, StructPacking, *this);
+ }
// Finally, round the size of the total struct up to the alignment of the
// struct itself.