aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/algorithm
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-05-10 20:57:45 +0000
committerEric Fiselier <eric@efcs.ca>2017-05-10 20:57:45 +0000
commit5d50aa32041596e2c32c50e8cf767cac5e98ba72 (patch)
tree3b1ec444349e84708793446b039746850729ef71 /libcxx/include/algorithm
parenta0987b83d53f38c374d8c090a7ce9081ab2b4444 (diff)
downloadllvm-5d50aa32041596e2c32c50e8cf767cac5e98ba72.zip
llvm-5d50aa32041596e2c32c50e8cf767cac5e98ba72.tar.gz
llvm-5d50aa32041596e2c32c50e8cf767cac5e98ba72.tar.bz2
[libc++] Refactor Windows support headers.
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
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index c3517a1..896d58e 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -644,8 +644,8 @@ template <class BidirectionalIterator, class Compare>
#if defined(__IBMCPP__)
#include "support/ibm/support.h"
#endif
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
-#include "support/win32/support.h"
+#if defined(_LIBCPP_COMPILER_MSVC)
+#include "support/win32/msvc_builtin_support.h"
#endif
#include <__undef_min_max>