diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2007-09-10 20:33:04 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-09-10 20:33:04 +0000 |
| commit | 33d037441ec3524a8b5efb894b80e76112c82032 (patch) | |
| tree | a893c8f1c0ba42a77d909d323f3d201cb53f4648 /clang/AST/Decl.cpp | |
| parent | f8ab0a9acc97fdb2648c3a467f2c93a008a1c395 (diff) | |
| download | bcm5719-llvm-33d037441ec3524a8b5efb894b80e76112c82032.tar.gz bcm5719-llvm-33d037441ec3524a8b5efb894b80e76112c82032.zip | |
Early patch to collect objective-c methods inserts them in
class object.
llvm-svn: 41801
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 5f87d93cbba..0e6c218f2d5 100644 --- a/clang/AST/Decl.cpp +++ b/clang/AST/Decl.cpp @@ -163,3 +163,23 @@ FieldDecl* RecordDecl::getMember(IdentifierInfo *name) { } return 0; } + +/// addObjcMethods - Insert instance and methods declarations into +/// ObjcInterfaceDecl's InsMethods and ClsMethods fields. +/// +void ObjcInterfaceDecl::ObjcAddMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers) { + NumInsMethods = numInsMembers; + if (numInsMembers) { + InsMethods = new ObjcMethodDecl*[numInsMembers]; + memcpy(InsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*)); + } + NumClsMethods = numClsMembers; + if (numClsMembers) { + ClsMethods = new ObjcMethodDecl*[numClsMembers]; + memcpy(ClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*)); + } +} + |

