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 | 39d641f52623b10caf787a515fc192e02d231d6e (patch) | |
| tree | 881554adbf05b2335d88f560ceaecd8380d097c1 /clang/AST/Decl.cpp | |
| parent | f0f2afce5a4b8859d8260c3c8d02e1f794e6e5f3 (diff) | |
| download | bcm5719-llvm-39d641f52623b10caf787a515fc192e02d231d6e.tar.gz bcm5719-llvm-39d641f52623b10caf787a515fc192e02d231d6e.zip | |
Patch to add objective-c's @protocl type declaration.
llvm-svn: 42060
Diffstat (limited to 'clang/AST/Decl.cpp')
| -rw-r--r-- | clang/AST/Decl.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp index d45780043fb..8208c020494 100644 --- a/clang/AST/Decl.cpp +++ b/clang/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*)); + } +} + + |

