diff options
author | Reid Kleckner <rnk@google.com> | 2018-07-23 17:44:00 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-07-23 17:44:00 +0000 |
commit | dbc390d0c52cc6d62f3eb3b60407e6b5588d525b (patch) | |
tree | f92e17b7db6392c61126186a5ed7286b33561eed /clang/lib/Basic/Targets | |
parent | 58407ca04570bb02e9869c0f368f9cdd664e22dd (diff) | |
download | bcm5719-llvm-dbc390d0c52cc6d62f3eb3b60407e6b5588d525b.tar.gz bcm5719-llvm-dbc390d0c52cc6d62f3eb3b60407e6b5588d525b.zip |
[MS] Update _MSVC_LANG values for C++17 and C++2a
Fixes PR38262
llvm-svn: 337715
Diffstat (limited to 'clang/lib/Basic/Targets')
-rw-r--r-- | clang/lib/Basic/Targets/OSTargets.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index cb7f089c095..d0354784acf 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -617,8 +617,10 @@ protected: Builder.defineMacro("_HAS_CHAR16_T_LANGUAGE_SUPPORT", Twine(1)); if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { - if (Opts.CPlusPlus17) - Builder.defineMacro("_MSVC_LANG", "201403L"); + if (Opts.CPlusPlus2a) + Builder.defineMacro("_MSVC_LANG", "201704L"); + else if (Opts.CPlusPlus17) + Builder.defineMacro("_MSVC_LANG", "201703L"); else if (Opts.CPlusPlus14) Builder.defineMacro("_MSVC_LANG", "201402L"); } |