This revision was automatically updated to reflect the committed changes.
ldionne marked an inline comment as done.
Closed by commit rL339431: [libc++] Enable aligned allocation based on feature
test macro, irrespective of… (authored by ldionne, committed by ).
Herald added a subscriber: llvm-comm
vsapsai accepted this revision.
vsapsai added inline comments.
This revision is now accepted and ready to land.
Comment at: libcxx/include/new:111-116
#if !__has_builtin(__builtin_operator_new) || \
__has_builtin(__builtin_operator_new) < 201802L || \
defined(_LIBCPP_HAS
ldionne marked an inline comment as done.
ldionne added inline comments.
Comment at: libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp:11
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
--
ldionne added inline comments.
Comment at: libcxx/include/new:111-116
#if !__has_builtin(__builtin_operator_new) || \
__has_builtin(__builtin_operator_new) < 201802L || \
defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) || \
!defined(__cpp_aligned_new) || __cpp_aligned_new
ldionne updated this revision to Diff 159903.
ldionne marked an inline comment as done.
ldionne added a comment.
Address vsapsai's comments
Repository:
rCXX libc++
https://reviews.llvm.org/D50344
Files:
libcxx/include/__config
libcxx/include/new
libcxx/test/libcxx/memory/aligned_alloca
vsapsai added inline comments.
Comment at: libcxx/include/__config:993
+!defined(_LIBCPP_BUILDING_LIBRARY) && \
+!defined(__cpp_aligned_new)
+# define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
I think I'd rather keep `__cpp_aligned_new >= 201606` check. I don't
ldionne created this revision.
ldionne added a reviewer: vsapsai.
Herald added a reviewer: EricWF.
Herald added subscribers: cfe-commits, dexonsmith, christof.
The current code enables aligned allocation functions when compiling in C++17
and later. This is a problem because aligned allocation func