1//===--- IdentifierTable.cpp - Hash table for identifier lookup -----------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 75 unchanged lines hidden (view full) --- 84 const LangOptions &LangOpts, IdentifierTable &Table) { 85 unsigned AddResult = 0; 86 if (Flags & KEYALL) AddResult = 2; 87 else if (LangOpts.CPlusPlus && (Flags & KEYCXX)) AddResult = 2; 88 else if (LangOpts.CPlusPlus0x && (Flags & KEYCXX0X)) AddResult = 2; 89 else if (LangOpts.C99 && (Flags & KEYC99)) AddResult = 2; 90 else if (LangOpts.GNUMode && (Flags & KEYGNU)) AddResult = 1; 91 else if (LangOpts.Microsoft && (Flags & KEYMS)) AddResult = 1; |
92 else if (LangOpts.Bool && (Flags & BOOLSUPPORT)) AddResult = 2; |
93 94 // Don't add this keyword if disabled in this language. 95 if (AddResult == 0) return; 96 97 IdentifierInfo &Info = Table.get(Keyword, Keyword+KWLen); 98 Info.setTokenID(TokenCode); 99 Info.setIsExtensionToken(AddResult == 1); 100} --- 290 unchanged lines hidden --- |