diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
commit | 3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch) | |
tree | 0bbe07708f7571f8b5291f6d7b96c102b7c99dee /lib/Basic/IdentifierTable.cpp | |
parent | a0482fa4e7fa27b01184f938097f0666b78016dd (diff) | |
download | src-3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f.tar.gz src-3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f.zip |
Notes
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | lib/Basic/IdentifierTable.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index 8993e6713fbe..6b673e39d365 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -34,6 +34,8 @@ IdentifierInfo::IdentifierInfo() { IsPoisoned = false; IsCPPOperatorKeyword = false; NeedsHandleIdentifier = false; + IsFromAST = false; + RevertedTokenID = false; FETokenInfo = 0; Entry = 0; } @@ -71,7 +73,8 @@ namespace { KEYMS = 32, BOOLSUPPORT = 64, KEYALTIVEC = 128, - KEYNOMS = 256 + KEYNOMS = 256, + KEYBORLAND = 512 }; } @@ -93,6 +96,7 @@ static void AddKeyword(llvm::StringRef Keyword, else if (LangOpts.C99 && (Flags & KEYC99)) AddResult = 2; else if (LangOpts.GNUKeywords && (Flags & KEYGNU)) AddResult = 1; else if (LangOpts.Microsoft && (Flags & KEYMS)) AddResult = 1; + else if (LangOpts.Borland && (Flags & KEYBORLAND)) AddResult = 1; else if (LangOpts.Bool && (Flags & BOOLSUPPORT)) AddResult = 2; else if (LangOpts.AltiVec && (Flags & KEYALTIVEC)) AddResult = 2; else if (!LangOpts.Microsoft && (Flags & KEYNOMS)) AddResult = 2; @@ -100,8 +104,7 @@ static void AddKeyword(llvm::StringRef Keyword, // Don't add this keyword if disabled in this language. if (AddResult == 0) return; - IdentifierInfo &Info = Table.get(Keyword); - Info.setTokenID(TokenCode); + IdentifierInfo &Info = Table.get(Keyword, TokenCode); Info.setIsExtensionToken(AddResult == 1); } @@ -110,8 +113,7 @@ static void AddKeyword(llvm::StringRef Keyword, static void AddCXXOperatorKeyword(llvm::StringRef Keyword, tok::TokenKind TokenCode, IdentifierTable &Table) { - IdentifierInfo &Info = Table.get(Keyword); - Info.setTokenID(TokenCode); + IdentifierInfo &Info = Table.get(Keyword, TokenCode); Info.setIsCPlusPlusOperatorKeyword(); } |