Add create methods for ObjCIvarDecl and ObjCInterfaceDecl


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 9580e0c..53ba8c1 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -30,7 +30,21 @@
   return new (Mem) ObjCMethodDecl(beginLoc, endLoc, SelInfo, T, contextDecl,
                                   M, isInstance, 
                                   isVariadic, impControl);
+}
 
+ObjCInterfaceDecl *ObjCInterfaceDecl::Create(ASTContext &C,SourceLocation atLoc,
+                                             unsigned numRefProtos,
+                                             IdentifierInfo *Id,
+                                             bool ForwardDecl, bool isInternal){
+  void *Mem = C.getAllocator().Allocate<ObjCInterfaceDecl>();
+  return new (Mem) ObjCInterfaceDecl(atLoc, numRefProtos, Id, ForwardDecl,
+                                     isInternal);
+}
+
+ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, SourceLocation L,
+                                   IdentifierInfo *Id, QualType T) {
+  void *Mem = C.getAllocator().Allocate<ObjCIvarDecl>();
+  return new (Mem) ObjCIvarDecl(L, Id, T);
 }