summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-16 01:23:04 +0000
committerChris Lattner <sabre@nondot.org>2008-03-16 01:23:04 +0000
commitf87ca0a7d13e33c0e9e5bf0ac64d1392e3c2c0aa (patch)
tree78941244d417a869d7163360ab547aa82df49e6e /clang/lib/AST/DeclObjC.cpp
parent2a52083efc80a68f1318cb7a4178c9d32bcc333a (diff)
downloadbcm5719-llvm-f87ca0a7d13e33c0e9e5bf0ac64d1392e3c2c0aa.tar.gz
bcm5719-llvm-f87ca0a7d13e33c0e9e5bf0ac64d1392e3c2c0aa.zip
Give ObjCProtocolDecl a Create method.
llvm-svn: 48410
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 53ba8c12194..17b1d28cadb 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -47,6 +47,14 @@ ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, SourceLocation L,
return new (Mem) ObjCIvarDecl(L, Id, T);
}
+ObjCProtocolDecl *ObjCProtocolDecl::Create(ASTContext &C, SourceLocation L,
+ unsigned numRefProtos,
+ IdentifierInfo *Id,
+ bool ForwardDecl) {
+ void *Mem = C.getAllocator().Allocate<ObjCProtocolDecl>();
+ return new (Mem) ObjCProtocolDecl(L, numRefProtos, Id, ForwardDecl);
+}
+
//===----------------------------------------------------------------------===//
// Objective-C Decl Implementation
OpenPOWER on IntegriCloud