make property addition work list all other "add" methods.  Do 
the allocation in the class, not in sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index dcb53e8..afc3aa1 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -171,6 +171,18 @@
 }
 
 /// addMethods - Insert instance and methods declarations into
+/// ObjCInterfaceDecl's InsMethods and ClsMethods fields.
+///
+void ObjCInterfaceDecl::addProperties(ObjCPropertyDecl **Properties, 
+                                      unsigned NumProperties) {
+  if (NumProperties == 0) return;
+  
+  NumPropertyDecl = NumProperties;
+  PropertyDecl = new ObjCPropertyDecl*[NumProperties];
+  memcpy(PropertyDecl, Properties, NumProperties*sizeof(ObjCPropertyDecl*));
+}                                   
+
+/// addMethods - Insert instance and methods declarations into
 /// ObjCProtocolDecl's ProtoInsMethods and ProtoClsMethods fields.
 ///
 void ObjCProtocolDecl::addMethods(ObjCMethodDecl **insMethods,