aboutsummaryrefslogtreecommitdiff
path: root/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
commitcca59d77c4b84fd2da268018dbaf9431a621e75b (patch)
tree627ecfb917327736fba7732e2a03b9a74b77efcc /lib/AST/DeclObjC.cpp
parentf962808120bd4cf1c684a0936fa1791ce2be73be (diff)
Give ObjCProtocolDecl a Create method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 53ba8c1219..17b1d28cad 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/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