diff options
author | Shoaib Meenai <smeenai@fb.com> | 2017-04-07 02:20:52 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2017-04-07 02:20:52 +0000 |
commit | 17af695f2b3d0e72844b2ccfc4fcf7ec6e40bbf2 (patch) | |
tree | 209cc86345f3c64696cf8d9cbac4582fc2412713 /libcxx/src | |
parent | dc8eb810dbc3ac333a1d5954e3616b9a1d54be0d (diff) | |
download | bcm5719-llvm-17af695f2b3d0e72844b2ccfc4fcf7ec6e40bbf2.tar.gz bcm5719-llvm-17af695f2b3d0e72844b2ccfc4fcf7ec6e40bbf2.zip |
[libc++] Drop support for CRTs older than VS 2015
LLVM dropped support for Visual Studio versions older than 2015 quite
some time ago, so I consider it safe to drop libc++'s support for older
CRTs. The CRT in Visual Studio 2015 provides a lot of previously missing
functions, so targeting it requires less special casing.
Differential Revision: https://reviews.llvm.org/D31798
llvm-svn: 299743
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/locale.cpp | 6 | ||||
-rw-r--r-- | libcxx/src/support/win32/locale_win32.cpp | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 6b633fc72e8..1460f9662e3 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -1109,13 +1109,7 @@ ctype<char>::classic_table() _NOEXCEPT #elif __sun__ return __ctype_mask; #elif defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) -#if _VC_CRT_MAJOR_VERSION < 14 - // This is assumed to be safe, which is a nonsense assumption because we're - // going to end up dereferencing it later... - return _ctype+1; // internal ctype mask table defined in msvcrt.dll -#else return __pctype_func(); -#endif #elif defined(__EMSCRIPTEN__) return *__ctype_b_loc(); #elif defined(_NEWLIB_VERSION) diff --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp index ee138111715..acbf79ac197 100644 --- a/libcxx/src/support/win32/locale_win32.cpp +++ b/libcxx/src/support/win32/locale_win32.cpp @@ -13,8 +13,6 @@ #include <memory> #include <type_traits> -#include <crtversion.h> - typedef _VSTD::remove_pointer<locale_t>::type __locale_struct; typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii; @@ -31,9 +29,8 @@ locale_t uselocale( locale_t newloc ) // uselocale sets the thread's locale by definition, so unconditionally use thread-local locale _configthreadlocale( _ENABLE_PER_THREAD_LOCALE ); // uselocale sets all categories -#if _VC_CRT_MAJOR_VERSION < 14 - setlocale( LC_ALL, newloc->locinfo->lc_category[LC_ALL].locale ); -#endif + // disable setting locale on Windows temporarily because the structure is opaque (PR31516) + //setlocale( LC_ALL, newloc->locinfo->lc_category[LC_ALL].locale ); // uselocale returns the old locale_t return old_locale; } |