Patch to create protocol conforming class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42856 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 051a4c1..406a745 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -987,20 +987,22 @@
   return PDecl;
 }
 
-/// ActOnFindProtocolDeclaration - This routine looks for a previously
-/// declared protocol and returns it. If not found, issues diagnostic.
-/// Will build a list of previously protocol declarations found in the list.
-Action::DeclTy **
-Sema::ActOnFindProtocolDeclaration(SourceLocation TypeLoc,
-                                   IdentifierInfo **ProtocolId,
-                                   unsigned NumProtocols) {
+/// FindProtocolDeclaration - This routine looks up protocols and
+/// issuer error if they are not declared. It returns list of protocol
+/// declarations in its 'Protocols' argument.
+void
+Sema::FindProtocolDeclaration(SourceLocation TypeLoc,
+                              IdentifierInfo **ProtocolId,
+                              unsigned NumProtocols,
+                              llvm::SmallVector<DeclTy *,8> &Protocols) {
   for (unsigned i = 0; i != NumProtocols; ++i) {
     ObjcProtocolDecl *PDecl = ObjcProtocols[ProtocolId[i]];
     if (!PDecl)
       Diag(TypeLoc, diag::err_undeclared_protocol, 
            ProtocolId[i]->getName());
+    else
+      Protocols.push_back(PDecl); 
   }
-  return 0;
 }
 
 /// ActOnForwardProtocolDeclaration -