Give ObjCProtocolDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index d5d658d..af57d09 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -211,10 +211,10 @@
     }
   }
   else {
-    PDecl = new ObjCProtocolDecl(AtProtoInterfaceLoc, NumProtoRefs, 
-                                 ProtocolName);
+    PDecl = ObjCProtocolDecl::Create(Context, AtProtoInterfaceLoc, NumProtoRefs, 
+                                     ProtocolName);
     ObjCProtocols[ProtocolName] = PDecl;
-  }    
+  }
   
   if (NumProtoRefs) {
     /// Check then save referenced protocols
@@ -260,7 +260,7 @@
     ObjCProtocolDecl *PDecl = ObjCProtocols[P];
     if (!PDecl)  { // Not already seen?
       // FIXME: Pass in the location of the identifier!
-      PDecl = new ObjCProtocolDecl(AtProtocolLoc, 0, P, true);
+      PDecl = ObjCProtocolDecl::Create(Context, AtProtocolLoc, 0, P, true);
       ObjCProtocols[P] = PDecl;
     }