summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp b/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp
index 7705834..67de1cb 100644
--- a/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp
+++ b/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp
@@ -111,7 +111,8 @@ namespace {
KEYCONCEPTS = 0x10000,
KEYOBJC2 = 0x20000,
KEYZVECTOR = 0x40000,
- KEYALL = (0x7ffff & ~KEYNOMS18 &
+ KEYCOROUTINES = 0x80000,
+ KEYALL = (0xfffff & ~KEYNOMS18 &
~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
};
@@ -147,6 +148,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts,
if (LangOpts.ObjC2 && (Flags & KEYARC)) return KS_Enabled;
if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled;
if (LangOpts.ObjC2 && (Flags & KEYOBJC2)) return KS_Enabled;
+ if (LangOpts.Coroutines && (Flags & KEYCOROUTINES)) return KS_Enabled;
if (LangOpts.CPlusPlus && (Flags & KEYCXX11)) return KS_Future;
return KS_Disabled;
}
@@ -220,10 +222,7 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) {
AddKeyword("__unknown_anytype", tok::kw___unknown_anytype, KEYALL,
LangOpts, *this);
- // FIXME: __declspec isn't really a CUDA extension, however it is required for
- // supporting cuda_builtin_vars.h, which uses __declspec(property). Once that
- // has been rewritten in terms of something more generic, remove this code.
- if (LangOpts.CUDA)
+ if (LangOpts.DeclSpecKeyword)
AddKeyword("__declspec", tok::kw___declspec, KEYALL, LangOpts, *this);
}
OpenPOWER on IntegriCloud