eliminate ObjCPropertyAttrs an corresponding enums, just use
strcmp when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57817 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index fa6b1a3..10ac427 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -392,20 +392,20 @@
     
     SourceLocation AttrName = ConsumeToken(); // consume last attribute name
     
-    if (II == ObjCPropertyAttrs[objc_readonly])
+    if (!strcmp(II->getName(), "readonly"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_readonly);
-    else if (II == ObjCPropertyAttrs[objc_assign])
+    else if (!strcmp(II->getName(), "assign"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_assign);
-    else if (II == ObjCPropertyAttrs[objc_readwrite])
+    else if (!strcmp(II->getName(), "readwrite"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_readwrite);
-    else if (II == ObjCPropertyAttrs[objc_retain])
+    else if (!strcmp(II->getName(), "retain"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_retain);
-    else if (II == ObjCPropertyAttrs[objc_copy])
+    else if (!strcmp(II->getName(), "copy"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_copy);
-    else if (II == ObjCPropertyAttrs[objc_nonatomic])
+    else if (!strcmp(II->getName(), "nonatomic"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_nonatomic);
-    else if (II == ObjCPropertyAttrs[objc_getter] || 
-             II == ObjCPropertyAttrs[objc_setter]) {
+    else if (!strcmp(II->getName(), "getter") || 
+             !strcmp(II->getName(), "setter")) {
       // getter/setter require extra treatment.
       if (ExpectAndConsume(tok::equal, diag::err_objc_expected_equal, "",
                            tok::r_paren))
@@ -417,7 +417,7 @@
         return;
       }
       
-      if (II == ObjCPropertyAttrs[objc_setter]) {
+      if (II->getName()[0] == 's') {
         DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_setter);
         DS.setSetterName(Tok.getIdentifierInfo());
         ConsumeToken();  // consume method name
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 697d0f6..6beaac0 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -273,18 +273,6 @@
     ObjCTypeQuals[objc_bycopy] = &PP.getIdentifierTable().get("bycopy");
     ObjCTypeQuals[objc_byref] = &PP.getIdentifierTable().get("byref");
   }
-  if (getLang().ObjC2) {
-    ObjCPropertyAttrs[objc_readonly] = &PP.getIdentifierTable().get("readonly");
-    ObjCPropertyAttrs[objc_getter] = &PP.getIdentifierTable().get("getter");
-    ObjCPropertyAttrs[objc_setter] = &PP.getIdentifierTable().get("setter");
-    ObjCPropertyAttrs[objc_assign] = &PP.getIdentifierTable().get("assign");
-    ObjCPropertyAttrs[objc_readwrite] =
-                                  &PP.getIdentifierTable().get("readwrite");
-    ObjCPropertyAttrs[objc_retain] = &PP.getIdentifierTable().get("retain");
-    ObjCPropertyAttrs[objc_copy] = &PP.getIdentifierTable().get("copy");
-    ObjCPropertyAttrs[objc_nonatomic] =
-                                  &PP.getIdentifierTable().get("nonatomic");
-  }
 
   Ident_super = &PP.getIdentifierTable().get("super");
 }