[libcxx] r330372 - Don't do aligned allocations on MSVCRT before 19.12 (update 15.3)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 19 15:12:10 PDT 2018


Author: rnk
Date: Thu Apr 19 15:12:10 2018
New Revision: 330372

URL: http://llvm.org/viewvc/llvm-project?rev=330372&view=rev
Log:
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

Modified:
    libcxx/trunk/include/__config

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=330372&r1=330371&r2=330372&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Thu Apr 19 15:12:10 2018
@@ -944,6 +944,12 @@ template <unsigned> struct __static_asse
 #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__)




More information about the cfe-commits mailing list