cleanup context-sensitive objc keyword recognition.  Patch by Fariborz Jahanian.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41583 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index d034dc2..581d585 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -247,6 +247,17 @@
   if (Tok.getKind() == tok::eof &&
       !getLang().CPlusPlus)  // Empty source file is an extension in C
     Diag(Tok, diag::ext_empty_source_file);
+  
+  // Initialization for Objective-C context sensitive keywords recognition.
+  // Referenced in Parser::isObjCTypeQualifier.
+  if (getLang().ObjC1) {
+    ObjcTypeQuals[objc_in] = &PP.getIdentifierTable().get("in");
+    ObjcTypeQuals[objc_out] = &PP.getIdentifierTable().get("out");
+    ObjcTypeQuals[objc_inout] = &PP.getIdentifierTable().get("inout");
+    ObjcTypeQuals[objc_oneway] = &PP.getIdentifierTable().get("oneway");
+    ObjcTypeQuals[objc_bycopy] = &PP.getIdentifierTable().get("bycopy");
+    ObjcTypeQuals[objc_byref] = &PP.getIdentifierTable().get("byref");
+  }
 }
 
 /// ParseTopLevelDecl - Parse one top-level declaration, return whatever the