r345646 - NFC: Merge KEYOBJC and KEYARC
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 30 13:51:28 PDT 2018
Author: epilk
Date: Tue Oct 30 13:51:28 2018
New Revision: 345646
URL: http://llvm.org/viewvc/llvm-project?rev=345646&view=rev
Log:
NFC: Merge KEYOBJC and KEYARC
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.
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/lib/Basic/IdentifierTable.cpp
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=345646&r1=345645&r2=345646&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Tue Oct 30 13:51:28 2018
@@ -576,10 +576,10 @@ ALIAS("__fp16", half , KE
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)
Modified: cfe/trunk/lib/Basic/IdentifierTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?rev=345646&r1=345645&r2=345646&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/IdentifierTable.cpp (original)
+++ cfe/trunk/lib/Basic/IdentifierTable.cpp Tue Oct 30 13:51:28 2018
@@ -99,30 +99,29 @@ IdentifierTable::IdentifierTable(const L
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(co
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;
More information about the cfe-commits
mailing list