[PATCH] D45836: Don't do aligned allocations on MSVCRT before 19.12 (update 15.3)

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 19 14:31:34 PDT 2018


rnk created this revision.
rnk added reviewers: EricWF, pcc.
Herald added a subscriber: christof.

https://reviews.llvm.org/D45836

Files:
  libcxx/include/__config


Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -944,6 +944,12 @@
 #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__)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45836.143161.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180419/7de1e803/attachment-0001.bin>


More information about the cfe-commits mailing list