diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-16 21:23:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 21:23:50 +0000 |
commit | 55d13b4d5530a14d5baa72adab32ae78ba256caf (patch) | |
tree | 9837795b9f69932113adae6bc639be31029be0a1 /lib/AST/DeclObjC.cpp | |
parent | f8d17a59167d9c2026506ed8813ea434d93b662a (diff) |
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
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index dcb53e8c42..afc3aa1959 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -171,6 +171,18 @@ void ObjCInterfaceDecl::addMethods(ObjCMethodDecl **insMethods, } /// 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, |