diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2015-05-26 19:44:52 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2015-05-26 19:44:52 +0000 |
commit | 674cf26892a724ffff202d3e48ff6b25b3a46a6d (patch) | |
tree | cff5c26ee68a79ef6b9e83e35aaa7dc06710733a /clang/lib/Basic/IdentifierTable.cpp | |
parent | 74df0df135e17963761e4771755ed091a4f99c96 (diff) | |
download | llvm-674cf26892a724ffff202d3e48ff6b25b3a46a6d.tar.gz |
__declspec is not a core Clang language extension. Instead, require -fms-extensions or -fborland to enable the language extension.
Note: __declspec is also temporarily enabled when compiling for a CUDA target because there are implementation details relying on __declspec(property) support currently. When those details change, __declspec should be disabled for CUDA targets.
llvm-svn: 238238
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 629b236eee43..e830be9603e6 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -215,6 +215,12 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) { if (LangOpts.ParseUnknownAnytype) 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) + AddKeyword("__declspec", tok::kw___declspec, KEYALL, LangOpts, *this); } /// \brief Checks if the specified token kind represents a keyword in the |