Nonfragile ivar synthesis with property is in a continuation
class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68234 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index cd1b979..57bd8ea 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -147,6 +147,22 @@
           return IV;
         }
     }
+    // look into continuation class.
+    for (ObjCCategoryDecl *Categories = ClassDecl->getCategoryList();
+         Categories; Categories = Categories->getNextClassCategory())
+      if (!Categories->getIdentifier()) {
+        for (ObjCInterfaceDecl::prop_iterator I = Categories->prop_begin(),
+             E = Categories->prop_end(); I != E; ++I) {
+          ObjCPropertyDecl *PDecl = (*I);
+          if (ObjCIvarDecl *IV = PDecl->getPropertyIvarDecl())
+            if (IV->getIdentifier() == ID) {
+              clsDeclared = ClassDecl;
+              return IV;
+            }          
+        }
+        break;
+      }
+    
     ClassDecl = ClassDecl->getSuperClass();
   }
   return NULL;