diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-09-17 21:07:36 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-09-17 21:07:36 +0000 |
commit | 25e077d59a8e8e43b65882b69610a3d5e2aaf53c (patch) | |
tree | 0df875e3aba8837463cd7987c6a24ae675f48117 /AST/Decl.cpp | |
parent | 708391a0e6cf848acc5277a1b9eaa919912944f5 (diff) |
Patch to add objective-c's @protocl type declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/Decl.cpp')
-rw-r--r-- | AST/Decl.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/AST/Decl.cpp b/AST/Decl.cpp index d45780043f..8208c02049 100644 --- a/AST/Decl.cpp +++ b/AST/Decl.cpp @@ -289,3 +289,23 @@ void ObjcInterfaceDecl::ObjcAddMethods(ObjcMethodDecl **insMethods, } } +/// ObjcAddProtoMethods - Insert instance and methods declarations into +/// ObjcProtocolDecl's ProtoInsMethods and ProtoClsMethods fields. +/// +void ObjcProtocolDecl::ObjcAddProtoMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers) { + NumProtoInsMethods = numInsMembers; + if (numInsMembers) { + ProtoInsMethods = new ObjcProtoMethodDecl*[numInsMembers]; + memcpy(ProtoInsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*)); + } + NumProtoClsMethods = numClsMembers; + if (numClsMembers) { + ProtoClsMethods = new ObjcProtoMethodDecl*[numClsMembers]; + memcpy(ProtoClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*)); + } +} + + |