summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-04-19 22:12:10 +0000
committerReid Kleckner <rnk@google.com>2018-04-19 22:12:10 +0000
commit6a2a5e0abb3ef6d7acf93f2c2a070db0a5a4c22e (patch)
treeb5ab3aa30928b3ae5afbadc30733b84494da9fb6
parent0a6bfb1843afae5a3968be24c4caa116c7b86de5 (diff)
downloadbcm5719-llvm-6a2a5e0abb3ef6d7acf93f2c2a070db0a5a4c22e.tar.gz
bcm5719-llvm-6a2a5e0abb3ef6d7acf93f2c2a070db0a5a4c22e.zip
Don't do aligned allocations on MSVCRT before 19.12 (update 15.3)
Reviewers: EricWF, pcc Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D45836 llvm-svn: 330372
-rw-r--r--libcxx/include/__config6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 84f17a9f50e..52c7142ffd1 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -944,6 +944,12 @@ template <unsigned> struct __static_assert_check {};
#define _DECLARE_C99_LDBL_MATH 1
#endif
+// If we are getting operator new from the MSVC CRT, then allocation overloads
+// for align_val_t were added in 19.12, aka VS 2017 version 15.3.
+#if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
+#define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#endif
+
#if defined(__APPLE__)
# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
OpenPOWER on IntegriCloud