@@ -77,57 +77,6 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
7777// Language Keyword Implementation
7878// ===----------------------------------------------------------------------===//
7979
80- // Constants for TokenKinds.def
81- namespace {
82-
83- enum TokenKey : unsigned {
84- KEYC99 = 0x1 ,
85- KEYCXX = 0x2 ,
86- KEYCXX11 = 0x4 ,
87- KEYGNU = 0x8 ,
88- KEYMS = 0x10 ,
89- BOOLSUPPORT = 0x20 ,
90- KEYALTIVEC = 0x40 ,
91- KEYNOCXX = 0x80 ,
92- KEYBORLAND = 0x100 ,
93- KEYOPENCLC = 0x200 ,
94- KEYC23 = 0x400 ,
95- KEYNOMS18 = 0x800 ,
96- KEYNOOPENCL = 0x1000 ,
97- WCHARSUPPORT = 0x2000 ,
98- HALFSUPPORT = 0x4000 ,
99- CHAR8SUPPORT = 0x8000 ,
100- KEYOBJC = 0x10000 ,
101- KEYZVECTOR = 0x20000 ,
102- KEYCOROUTINES = 0x40000 ,
103- KEYMODULES = 0x80000 ,
104- KEYCXX20 = 0x100000 ,
105- KEYOPENCLCXX = 0x200000 ,
106- KEYMSCOMPAT = 0x400000 ,
107- KEYSYCL = 0x800000 ,
108- KEYCUDA = 0x1000000 ,
109- KEYZOS = 0x2000000 ,
110- KEYNOZOS = 0x4000000 ,
111- KEYHLSL = 0x8000000 ,
112- KEYFIXEDPOINT = 0x10000000 ,
113- KEYMAX = KEYFIXEDPOINT, // The maximum key
114- KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
115- KEYALL = (KEYMAX | (KEYMAX - 1 )) & ~KEYNOMS18 & ~KEYNOOPENCL &
116- ~KEYNOZOS // KEYNOMS18, KEYNOOPENCL, KEYNOZOS are excluded.
117- };
118-
119- // / How a keyword is treated in the selected standard. This enum is ordered
120- // / intentionally so that the value that 'wins' is the most 'permissive'.
121- enum KeywordStatus {
122- KS_Unknown, // Not yet calculated. Used when figuring out the status.
123- KS_Disabled, // Disabled
124- KS_Future, // Is a keyword in future standard
125- KS_Extension, // Is an extension
126- KS_Enabled, // Enabled
127- };
128-
129- } // namespace
130-
13180// This works on a single TokenKey flag and checks the LangOpts to get the
13281// KeywordStatus based exclusively on this flag, so that it can be merged in
13382// getKeywordStatus. Most should be enabled/disabled, but some might imply
@@ -220,9 +169,7 @@ static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts,
220169 }
221170}
222171
223- // / Translates flags as specified in TokenKinds.def into keyword status
224- // / in the given language standard.
225- static KeywordStatus getKeywordStatus (const LangOptions &LangOpts,
172+ KeywordStatus clang::getKeywordStatus (const LangOptions &LangOpts,
226173 unsigned Flags) {
227174 // KEYALL means always enabled, so special case this one.
228175 if (Flags == KEYALL) return KS_Enabled;
0 commit comments