summaryrefslogtreecommitdiffstats
path: root/clang/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Basic/IdentifierTable.cpp')
-rw-r--r--clang/Basic/IdentifierTable.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/Basic/IdentifierTable.cpp b/clang/Basic/IdentifierTable.cpp
index f6c5f3a1af9..45d888140a2 100644
--- a/clang/Basic/IdentifierTable.cpp
+++ b/clang/Basic/IdentifierTable.cpp
@@ -91,12 +91,13 @@ static void AddKeyword(const char *Keyword, unsigned KWLen,
}
static void AddAlias(const char *Keyword, unsigned KWLen,
+ tok::TokenKind AliaseeID,
const char *AliaseeKeyword, unsigned AliaseeKWLen,
const LangOptions &LangOpts, IdentifierTable &Table) {
IdentifierInfo &AliasInfo = Table.get(Keyword, Keyword+KWLen);
IdentifierInfo &AliaseeInfo = Table.get(AliaseeKeyword,
AliaseeKeyword+AliaseeKWLen);
- AliasInfo.setTokenID(AliaseeInfo.getTokenID());
+ AliasInfo.setTokenID(AliaseeID);
AliasInfo.setIsExtensionToken(AliaseeInfo.isExtensionToken());
}
@@ -148,7 +149,8 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) {
((FLAGS) >> CPP0xShift) & Mask, \
((FLAGS) >> BoolShift) & Mask, LangOpts, *this);
#define ALIAS(NAME, TOK) \
- AddAlias(NAME, strlen(NAME), #TOK, strlen(#TOK), LangOpts, *this);
+ AddAlias(NAME, strlen(NAME), tok::kw_ ## TOK, #TOK, strlen(#TOK), \
+ LangOpts, *this);
#define CXX_KEYWORD_OPERATOR(NAME, ALIAS) \
if (LangOpts.CXXOperatorNames) \
AddCXXOperatorKeyword(#NAME, strlen(#NAME), tok::ALIAS, *this);
OpenPOWER on IntegriCloud