summaryrefslogtreecommitdiffstats
path: root/libcxx/include/new
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-01-20 01:47:26 +0000
committerEric Fiselier <eric@efcs.ca>2017-01-20 01:47:26 +0000
commitefea04512c28e1b8dea3d732e18a9213f3ed33c6 (patch)
treebb3ee3aef58bafe73e54e4ba2749f8546953ff0a /libcxx/include/new
parentd294823930f4815eab824ae56ca7e6d9b1e8134c (diff)
downloadbcm5719-llvm-efea04512c28e1b8dea3d732e18a9213f3ed33c6.tar.gz
bcm5719-llvm-efea04512c28e1b8dea3d732e18a9213f3ed33c6.zip
Disable aligned new/delete on Apple platforms without posix_memalign
Summary: This patch disables the aligned new/delet overloads on Apple platforms without `posix_memalign`. This fixes libc++.dylib build regressions on such platforms. This fixes http://llvm.org/PR31448. This patch should also be merged into the 4.0 release branch Reviewers: mclow.lists, rsmith, dexonsmith, jeremyhu Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28931 llvm-svn: 292564
Diffstat (limited to 'libcxx/include/new')
-rw-r--r--libcxx/include/new5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcxx/include/new b/libcxx/include/new
index 6589f16b7a1..6e43501d299 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -101,8 +101,9 @@ void operator delete[](void* ptr, void*) noexcept;
# define _LIBCPP_HAS_NO_SIZED_DEALLOCATION
#endif
-#if !(defined(_LIBCPP_BUILDING_NEW) || _LIBCPP_STD_VER > 14 || \
- (defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606))
+#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \
+ (!(defined(_LIBCPP_BUILDING_NEW) || _LIBCPP_STD_VER > 14 || \
+ (defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606)))
# define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
#endif
OpenPOWER on IntegriCloud