]> granicus.if.org Git - clang/commitdiff
NFC: Merge KEYOBJC and KEYARC
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 30 Oct 2018 20:51:28 +0000 (20:51 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 30 Oct 2018 20:51:28 +0000 (20:51 +0000)
We used to only define ARC keywords in -fobjc-arc mode, but now that we define
them in ObjC mode, there isn't any reason to keep them seperate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345646 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TokenKinds.def
lib/Basic/IdentifierTable.cpp

index 7db033ade523e460ba587894cbdc23c40c6fb170..e4616c9a6ab4de5936aff7133e0e6302ab50c929 100644 (file)
@@ -576,10 +576,10 @@ ALIAS("__fp16", half                , KEYALL)
 KEYWORD(half                        , HALFSUPPORT)
 
 // Objective-C ARC keywords.
-KEYWORD(__bridge                     , KEYARC)
-KEYWORD(__bridge_transfer            , KEYARC)
-KEYWORD(__bridge_retained            , KEYARC)
-KEYWORD(__bridge_retain              , KEYARC)
+KEYWORD(__bridge                     , KEYOBJC)
+KEYWORD(__bridge_transfer            , KEYOBJC)
+KEYWORD(__bridge_retained            , KEYOBJC)
+KEYWORD(__bridge_retain              , KEYOBJC)
 
 // Objective-C keywords.
 KEYWORD(__covariant                  , KEYOBJC)
index d42b80f9e71ee68567f177a35f4b9017dd689752..a58484990649288e7ee0197fb8f9fb8efe4b2301 100644 (file)
@@ -99,30 +99,29 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
 namespace {
 
   enum {
-    KEYC99 = 0x1,
-    KEYCXX = 0x2,
-    KEYCXX11 = 0x4,
-    KEYGNU = 0x8,
-    KEYMS = 0x10,
-    BOOLSUPPORT = 0x20,
-    KEYALTIVEC = 0x40,
-    KEYNOCXX = 0x80,
-    KEYBORLAND = 0x100,
-    KEYOPENCLC = 0x200,
-    KEYC11 = 0x400,
-    KEYARC = 0x800,
-    KEYNOMS18 = 0x01000,
-    KEYNOOPENCL = 0x02000,
-    WCHARSUPPORT = 0x04000,
-    HALFSUPPORT = 0x08000,
-    CHAR8SUPPORT = 0x10000,
-    KEYCONCEPTS = 0x20000,
-    KEYOBJC     = 0x40000,
-    KEYZVECTOR  = 0x80000,
-    KEYCOROUTINES = 0x100000,
-    KEYMODULES = 0x200000,
-    KEYCXX2A = 0x400000,
-    KEYOPENCLCXX = 0x800000,
+    KEYC99        = 0x1,
+    KEYCXX        = 0x2,
+    KEYCXX11      = 0x4,
+    KEYGNU        = 0x8,
+    KEYMS         = 0x10,
+    BOOLSUPPORT   = 0x20,
+    KEYALTIVEC    = 0x40,
+    KEYNOCXX      = 0x80,
+    KEYBORLAND    = 0x100,
+    KEYOPENCLC    = 0x200,
+    KEYC11        = 0x400,
+    KEYNOMS18     = 0x800,
+    KEYNOOPENCL   = 0x1000,
+    WCHARSUPPORT  = 0x2000,
+    HALFSUPPORT   = 0x4000,
+    CHAR8SUPPORT  = 0x8000,
+    KEYCONCEPTS   = 0x10000,
+    KEYOBJC       = 0x20000,
+    KEYZVECTOR    = 0x40000,
+    KEYCOROUTINES = 0x80000,
+    KEYMODULES    = 0x100000,
+    KEYCXX2A      = 0x200000,
+    KEYOPENCLCXX  = 0x400000,
     KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX2A,
     KEYALL = (0xffffff & ~KEYNOMS18 &
               ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
@@ -163,7 +162,6 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts,
   if (LangOpts.C11 && (Flags & KEYC11)) return KS_Enabled;
   // We treat bridge casts as objective-C keywords so we can warn on them
   // in non-arc mode.
-  if (LangOpts.ObjC && (Flags & KEYARC)) return KS_Enabled;
   if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled;
   if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled;
   if (LangOpts.CoroutinesTS && (Flags & KEYCOROUTINES)) return KS_Enabled;