summaryrefslogtreecommitdiffstats
path: root/libcxx/include/support/win32/support.h
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Refactor Windows support headers.Eric Fiselier2017-05-101-177/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch refactors and tries to remove as much of the Windows support headers as possible. This is needed because they currently introduce super weird include cycles and dependencies between STL and libc headers. The changes in this patch are: * remove `support/win32/support.h` completely. The required parts have either been moved into `support/win32/msvc_support.h` (for `MSVC` only helpers not needed by Clang), or directly into their respective `foo.h` headers. * Combine `locale_win32.h` and `locale_mgmt_win32.h` into a single headers, this header should only be included within `__locale` or `locale` to avoid include cycles. * Remove the unneeded parts of `limits_win32.h` and re-name it to `limits_msvc_win32.h` since it's only needed by Clang. I've tested this patch using Clang on Windows, but I suspect it might technically regress our non-existent support for MSVC. Is somebody able to double check? This refactor is needed to support upcoming fixes to `<locale>` on Windows. Reviewers: bcraig, rmaprath, compnerd, EricWF Reviewed By: EricWF Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D32988 llvm-svn: 302727
* [libc++] Drop support for CRTs older than VS 2015Shoaib Meenai2017-04-071-8/+0
| | | | | | | | | | | 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
* Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros.Eric Fiselier2017-01-061-2/+2
| | | | | | | | | | | | This patch refactors the compiler detection done in `__config` by creating a set of `_LIBCPP_COMPILER_<TYPE>` macros. The goal of this patch is to make it easier to detect what compiler is being used outside of `__config`. Additionally this patch removes workarounds for GCC in `__bit_reference`. I tested GCC 4.8 and 4.9 without the workaround and neither seemed to need it anymore. llvm-svn: 291286
* Refactor bitscan64 checkSaleem Abdulrasool2017-01-041-3/+2
| | | | | | | | Introduce a `_LIBCPP_HAS_BITSCAN64` macro to specify if the 64-bit variant of the bitscan family of APIs is available. This avoids duplicating the check in the support header. llvm-svn: 290924
* clean up use of _WIN32Saleem Abdulrasool2017-01-031-8/+6
| | | | | | | | | Replace the use of _WIN32 in libc++. Replace most use with a C runtime check _LIBCPP_MSVCRT or the new _LIBCPP_WIN32 to indicate that we are using the Win32 API. Use a new _LIBCPP_WCHAR_IS_UCS2 to indicate that we are on an environment that has a short wchar_t. llvm-svn: 290910
* support: clean up MSVC supportSaleem Abdulrasool2016-09-081-20/+2
| | | | | | | | | | | Visual Studio 2013 (CRT version 12) added support for many C99 long long and long double functions. Visual Studio 2015 (CRT version 14) increased C99 and C11 compliance further. Since we don't support Visual Studio versions older than 2013, we can considerably clean up the support header. Patch by Shoaib Meenai! llvm-svn: 280988
* Fix win32 support header for mingw32.Dan Albert2014-10-061-0/+3
| | | | | | These functions are defined as static in the mingw32 headers. llvm-svn: 219140
* 80 cols fixes.Yaron Keren2014-01-041-99/+123
| | | | llvm-svn: 198482
* Implement the functions: clz, clzl, clzll, ctz, ctzl, and ctzllYaron Keren2014-01-041-27/+88
| | | | | | | | for libcxx when compiled with Visual C++ on Win32 and Win64. clang and gcc (MinGW) compilers provide these implementations themselves. llvm-svn: 198481
* Windows.h is not required.Yaron Keren2013-11-151-1/+0
| | | | llvm-svn: 194870
* G M: Restore the ability for libcxx to compile again on mingw 64.Howard Hinnant2013-09-171-1/+6
| | | | llvm-svn: 190837
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can also define _MSC_VER, and MSVCRT is not necessarily the only C runtime, these macros should not be used interchangeably. This patch divides all Windows-related bits into the aforementioned categories. Two new macros are introduced: - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using _MSC_VER, excluding Clang. - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default when _WIN32 is defined. This leaves _WIN32 for code using the Windows API. This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF. Nico, please prepare a patch for CREDITS.TXT, thanks. llvm-svn: 187593
* Glen: This patch gets the string conversion functions working on Windows. ↵Howard Hinnant2013-05-161-9/+8
| | | | | | It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability. llvm-svn: 182026
* Add missing newlines at EOF.Bob Wilson2012-02-201-1/+1
| | | | llvm-svn: 150965
* Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto ↵Howard Hinnant2011-12-021-5/+5
| | | | | | Ganesh Barbati llvm-svn: 145698
* Jean-Daniel: __builtin_popcountll support for WindowsHoward Hinnant2011-12-021-3/+26
| | | | llvm-svn: 145684
* Windows port work by Ruben Van BoxemHoward Hinnant2011-10-271-7/+4
| | | | llvm-svn: 143105
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-221-6/+70
| | | | llvm-svn: 142732
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-281-5/+13
| | | | llvm-svn: 140728
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-231-0/+8
| | | | llvm-svn: 140384
* Partial Windows port by Ruben Van BoxemHoward Hinnant2011-09-221-0/+15
llvm-svn: 140328
OpenPOWER on IntegriCloud