summaryrefslogtreecommitdiffstats
path: root/clang/AST/Decl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-09-17 21:07:36 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-09-17 21:07:36 +0000
commit39d641f52623b10caf787a515fc192e02d231d6e (patch)
tree881554adbf05b2335d88f560ceaecd8380d097c1 /clang/AST/Decl.cpp
parentf0f2afce5a4b8859d8260c3c8d02e1f794e6e5f3 (diff)
downloadbcm5719-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.cpp20
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*));
+ }
+}
+
+
OpenPOWER on IntegriCloud