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 | 41eec3d0979e80cbe7e754b4e3c85acc00cc8dd6 (patch) | |
tree | 6300a33d4bc37b723fa42f5dee54cf6739ff689d /clang/lib/AST/DeclObjC.cpp | |
parent | 219b3e9c6cc7965b375bf8d11bd30f78d5bae7fa (diff) | |
download | bcm5719-llvm-41eec3d0979e80cbe7e754b4e3c85acc00cc8dd6.tar.gz bcm5719-llvm-41eec3d0979e80cbe7e754b4e3c85acc00cc8dd6.zip |
make property addition work list all other "add" methods. Do
the allocation in the class, not in sema.
llvm-svn: 48433
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index dcb53e8c426..afc3aa19598 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/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, |