summaryrefslogtreecommitdiffstats
path: root/libcxx/src/support/win32
Commit message (Collapse)AuthorAgeFilesLines
* [windows] Fix warning about comparing ints of different signsMartin Storsjo2018-07-251-2/+3
| | | | | | | | | | | | | | This fixes a warning like this: warning: comparison of integers of different signs: 'std::__1::__libcpp_tls_key' (aka 'long') and 'DWORD' (aka 'unsigned long') [-Wsign-compare] if (*__key == FLS_OUT_OF_INDEXES) ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ Differential Revision: https://reviews.llvm.org/D49782 llvm-svn: 337946
* [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by ↵Louis Dionne2018-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | _LIBCPP_INLINE_VISIBILITY Summary: We never actually mean to always inline a function -- all the uses of the macro I could find are actually attempts to control the visibility of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which is actually always defined the same. This change is orthogonal to the decision of what we're actually going to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by having one canonical way of doing things. Note that this commit had originally been applied in r336369 and then reverted in r336382 because of unforeseen problems. Both of these problems have now been fixed. Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, erikvanderpoel Differential Revision: https://reviews.llvm.org/D48892 llvm-svn: 336866
* Revert "[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by ↵Louis Dionne2018-07-051-2/+2
| | | | | | | | | | | | | | | _LIBCPP_INLINE_VISIBILITY" This reverts commit r336369. The commit had two problems: 1. __pbump was marked as _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY instead of _LIBCPP_INLINE_VISIBILITY, which lead to two symbols being added in the dylib and the check-cxx-abilist failing. 2. The LLDB tests started failing because they undefine `_LIBCPP_INLINE_VISIBILITY`. I need to figure out why they do that and fix the tests before we can go forward with this change. llvm-svn: 336382
* [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITYLouis Dionne2018-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: We never actually mean to always inline a function -- all the uses of the macro I could find are actually attempts to control the visibility of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which is actually always defined the same. This change is orthogonal to the decision of what we're actually going to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by having one canonical way of doing things. Reviewers: EricWF Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists Differential Revision: https://reviews.llvm.org/D48892 llvm-svn: 336369
* libcxx: Rename vasprintf function to __libcpp_vasprintf.Peter Collingbourne2018-01-232-2/+4
| | | | | | | | | | | The language standard does not define a function with this name, so it is part of the user's namespace. This change fixes a duplicate symbol error that occurs when a user attempts to define a function with this name. Differential Revision: https://reviews.llvm.org/D42405 llvm-svn: 323237
* libcxx: Move Windows threading support into a .cpp file.Peter Collingbourne2018-01-231-0/+275
| | | | | | | | | This allows us to avoid polluting the namespace of users of <thread> with the definitions in windows.h. Differential Revision: https://reviews.llvm.org/D42214 llvm-svn: 323169
* Allow to set locale on Windows.Martin Storsjo2017-11-231-15/+1
| | | | | | | | | | | | | | | Fix the problem PR31516 with setting locale on Windows by wrapping _locale_t with a pointer-like class. Reduces 74 test failures in std/localization test suite to 47 test failures (on llvm clang, Visual Studio 2015). Number of test failures doesn't depend on the platform (x86 or x64). Patch by Andrey Khalyavin. Differential Revision: https://reviews.llvm.org/D40181 llvm-svn: 318902
* Fix Libc++ build with MinGW64Eric Fiselier2017-05-312-11/+24
| | | | | | | | | | | | | | Summary: This patch corrects the build errors I encountered when building on MinGW64. Reviewers: mati865, rnk, compnerd, smeenai, bcraig Reviewed By: mati865, smeenai Subscribers: martell, chapuni, cfe-commits Differential Revision: https://reviews.llvm.org/D33082 llvm-svn: 304360
* Refactor <locale> RAII guards to aid upcoming Windows locale changes.Eric Fiselier2017-05-081-13/+13
| | | | | | | | | | | | | | | | | | | Previously <locale> used std::unique_ptr<remove_ptr<locale_t>, locale-mgmt-function> as a scope guard for (A) creating new locales, and (B) setting the thread specific locale in RAII safe manner. However using unique_ptr has some problems, first it requires that locale_t is a pointer type, which may not be the case (Windows will need a non-pointer locale_t type that emulates _locale_t). The second problem is that users of the guards had to supply the locale management function to the custom deleter at every call site. However these locale management functions don't exist natively Windows, making a good Windows implementation of locale more difficult. This patch creates distinct and simply RAII guards that replace unique_ptr. These guards handle calling the correct locale management function so that callers don't have too. This simplification will aid in upcoming Windows fixes. llvm-svn: 302474
* [libc++] Drop support for CRTs older than VS 2015Shoaib Meenai2017-04-071-5/+2
| | | | | | | | | | | 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
* win32: temporarily disable setting locale on 14+Saleem Abdulrasool2017-01-021-0/+4
| | | | | | | | | | The locale structures have been made opaque in CRT 14+. This currently prevents building libc++ for Windows. We can re-enable this in the future when we have replicated the structure to access the private field for the name (unless there exists a better supported mechanism to query the name of a locale given the locale_t). llvm-svn: 290835
* [libc++] Avoid <memory> include in locale_win32.hShoaib Meenai2016-09-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | When `_LIBCPP_NO_EXCEPTIONS` is defined, we end up with compile errors when targeting MSVCRT: * Code includes `<new>` * `<new>` includes `<cstdlib>` in order to get `abort` * `<cstdlib>` includes `<stdlib.h>`, _before_ the `using ::abort` * `<stdlib.h>` includes `locale_win32.h` * `locale_win32.h` includes `<memory>` * `<memory>` includes `<stdexcept>` * `<stdexcept>` includes `<cstdlib` for `abort`, but that inclusion gets (correctly) ignored because of header guards * `<stdexcept>` references `_VSTD::abort`, which isn't declared The easiest solution is to make `locale_win32.h` not include `<memory>`, by removing the use of `unique_ptr` and manually restoring the locale instead. Differential Revision: https://reviews.llvm.org/D24374 llvm-svn: 281641
* Fix typosAlp Toker2014-05-151-2/+2
| | | | llvm-svn: 208869
* This patch implements snprintf_l function in a way similar to the other Yaron Keren2013-11-181-0/+10
| | | | | | | | | | | functions in src/support/win32/locale_win32.cpp and locale_win32.h, calling upon vsnprintf for which there is a MingW correct alternative. Note! __USE_MINGW_ANSI_STDIO is not modified in this patch. In order to use the __mingw version it must be defined before including the MingW headers. llvm-svn: 195044
* G M: Improvements to Windows support.Howard Hinnant2013-08-262-49/+45
| | | | llvm-svn: 189273
* War on tabs.Howard Hinnant2013-07-081-3/+3
| | | | llvm-svn: 185865
* Glen: This patch gets the string conversion functions working on Windows. ↵Howard Hinnant2013-05-162-22/+39
| | | | | | It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability. llvm-svn: 182026
* Reference: ↵Howard Hinnant2013-04-021-26/+99
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html llvm-svn: 178581
* Reference: ↵Howard Hinnant2013-04-021-0/+2
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html llvm-svn: 178545
* Reference: ↵Howard Hinnant2013-04-021-5/+14
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.html llvm-svn: 178544
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-221-6/+6
| | | | llvm-svn: 142732
* de-tabbifyHoward Hinnant2011-10-172-5/+5
| | | | llvm-svn: 142237
* Windows port work by Ruben Van BoxemHoward Hinnant2011-09-291-0/+94
| | | | llvm-svn: 140805
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-281-2/+11
| | | | llvm-svn: 140728
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-231-2/+41
| | | | llvm-svn: 140384
* Partial Windows port by Ruben Van BoxemHoward Hinnant2011-09-221-0/+22
llvm-svn: 140328
OpenPOWER on IntegriCloud