Semantics of @protocol attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp
index 342c87f..0a418bb 100644
--- a/lib/Parse/AttributeList.cpp
+++ b/lib/Parse/AttributeList.cpp
@@ -94,6 +94,7 @@
   case 11:
     if (!memcmp(Str, "vector_size", 11)) return AT_vector_size;
     if (!memcmp(Str, "constructor", 11)) return AT_constructor;
+    if (!memcmp(Str, "unavailable", 11)) return AT_unavailable;
     break;
   case 13:
     if (!memcmp(Str, "address_space", 13)) return AT_address_space;
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 5f2ebad..e70d202 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -936,7 +936,8 @@
   if (Tok.is(tok::semi)) { // forward declaration of one protocol.
     IdentifierLocPair ProtoInfo(protocolName, nameLoc);
     ConsumeToken();
-    return Actions.ActOnForwardProtocolDeclaration(AtLoc, &ProtoInfo, 1);
+    return Actions.ActOnForwardProtocolDeclaration(AtLoc, &ProtoInfo, 1, 
+                                                   attrList);
   }
   
   if (Tok.is(tok::comma)) { // list of forward declarations.
@@ -964,7 +965,8 @@
     
     return Actions.ActOnForwardProtocolDeclaration(AtLoc,
                                                    &ProtocolRefs[0], 
-                                                   ProtocolRefs.size());
+                                                   ProtocolRefs.size(),
+                                                   attrList);
   }
   
   // Last, and definitely not least, parse a protocol declaration.