aboutsummaryrefslogtreecommitdiff
path: root/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST')
-rw-r--r--lib/AST/DeclObjC.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 2d959445d4..a5eb07a84c 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -198,6 +198,18 @@ void ObjCInterfaceDecl::addProperties(ObjCPropertyDecl **Properties,
}
/// addProperties - Insert property declaration AST nodes into
+/// ObjCProtocolDecl's PropertyDecl field.
+///
+void ObjCProtocolDecl::addProperties(ObjCPropertyDecl **Properties,
+ unsigned NumProperties) {
+ if (NumProperties == 0) return;
+
+ NumPropertyDecl = NumProperties;
+ PropertyDecl = new ObjCPropertyDecl*[NumProperties];
+ memcpy(PropertyDecl, Properties, NumProperties*sizeof(ObjCPropertyDecl*));
+}
+
+/// addProperties - Insert property declaration AST nodes into
/// ObjCCategoryDecl's PropertyDecl field.
///
void ObjCCategoryDecl::addProperties(ObjCPropertyDecl **Properties,