clean up property memory allocation to move it into the ast classes
like the rest of the classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48434 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index afc3aa1..2e3a06a 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -419,3 +419,15 @@
assert(false && "unknown method context");
return 0;
}
+
+void ObjCPropertyDecl::setPropertyDeclLists(ObjCIvarDecl **Properties,
+ unsigned NumProp) {
+ assert(PropertyDecls == 0 && "Properties already set");
+ if (NumProp == 0) return;
+ NumPropertyDecls = NumProp;
+
+ PropertyDecls = new ObjCIvarDecl*[NumProp];
+ memcpy(PropertyDecls, Properties, NumProp*sizeof(ObjCIvarDecl*));
+}
+
+