Give ObjCMethodDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index f7f3ada..ccdc499 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -15,6 +15,26 @@
 #include "clang/AST/ASTContext.h"
 using namespace clang;
 
+//===----------------------------------------------------------------------===//
+// ObjC Decl Allocation/Deallocation Method Implementations
+//===----------------------------------------------------------------------===//
+
+ObjCMethodDecl *ObjCMethodDecl::Create(ASTContext &C, SourceLocation beginLoc, 
+                                       SourceLocation endLoc,
+                                       Selector SelInfo, QualType T,
+                                       Decl *contextDecl,
+                                       ParmVarDecl **paramInfo, int numParams,
+                                       AttributeList *M, bool isInstance,
+                                       bool isVariadic,
+                                       ImplementationControl impControl,
+                                       Decl *PrevDecl) {
+  void *Mem = C.getAllocator().Allocate<ObjCMethodDecl>();
+  return new (Mem) ObjCMethodDecl(beginLoc, endLoc, SelInfo, T, contextDecl,
+                                  paramInfo, numParams, M, isInstance, 
+                                  isVariadic, impControl, PrevDecl);
+
+}
+
 
 //===----------------------------------------------------------------------===//
 // Objective-C Decl Implementation