diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-01-20 01:47:26 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-01-20 01:47:26 +0000 |
| commit | efea04512c28e1b8dea3d732e18a9213f3ed33c6 (patch) | |
| tree | bb3ee3aef58bafe73e54e4ba2749f8546953ff0a /libcxx/src/new.cpp | |
| parent | d294823930f4815eab824ae56ca7e6d9b1e8134c (diff) | |
| download | bcm5719-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/src/new.cpp')
| -rw-r--r-- | libcxx/src/new.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp index 391718fdad7..b1e8ee324d8 100644 --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -151,6 +151,8 @@ operator delete[] (void* ptr, size_t) _NOEXCEPT ::operator delete[](ptr); } +#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) + _LIBCPP_WEAK void * operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC @@ -275,6 +277,8 @@ operator delete[] (void* ptr, size_t, std::align_val_t alignment) _NOEXCEPT ::operator delete[](ptr, alignment); } +#endif // !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) + #endif // !__GLIBCXX__ namespace std |

