diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:53:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:53:07 +0000 |
commit | 75c9cae5f85c72cbb1649e93849e16ede3f07522 (patch) | |
tree | b2df5fb8ba5877b81749e8d36c4fc2e1564c8667 /lib/AST/DeclObjC.cpp | |
parent | 68c82cf61228102aba1194efef222fa1478af2a8 (diff) |
add two more Create methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index cd4c6fff9f..4f1671ef07 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -73,6 +73,21 @@ ObjCCategoryDecl *ObjCCategoryDecl::Create(ASTContext &C, SourceLocation L, return new (Mem) ObjCCategoryDecl(L, Id); } +ObjCCategoryImplDecl * +ObjCCategoryImplDecl::Create(ASTContext &C, SourceLocation L,IdentifierInfo *Id, + ObjCInterfaceDecl *ClassInterface) { + void *Mem = C.getAllocator().Allocate<ObjCCategoryImplDecl>(); + return new (Mem) ObjCCategoryImplDecl(L, Id, ClassInterface); +} + +ObjCImplementationDecl * +ObjCImplementationDecl::Create(ASTContext &C, SourceLocation L, + IdentifierInfo *Id, + ObjCInterfaceDecl *ClassInterface, + ObjCInterfaceDecl *SuperDecl) { + void *Mem = C.getAllocator().Allocate<ObjCImplementationDecl>(); + return new (Mem) ObjCImplementationDecl(L, Id, ClassInterface, SuperDecl); +} //===----------------------------------------------------------------------===// // Objective-C Decl Implementation |