[PATCH] D55791: [libcxx] Simplify conditional definition of _LIBCPP_HAS_NO_ALIGNED_ALLOCATION

Louis Dionne via Phabricator reviews at reviews.llvm.org
Mon Dec 17 14:34:32 PST 2018


ldionne created this revision.
ldionne added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous, christof.

It turns out that _LIBCPP_HAS_NO_ALIGNED_ALLOCATION can never be defined
before this point (because that is the only place that defines it), so
the conditional definition of _LIBCPP_HAS_NO_ALIGNED_ALLOCATION can be
simplified.


Repository:
  rCXX libc++

https://reviews.llvm.org/D55791

Files:
  libcxx/include/__config


Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -994,9 +994,8 @@
 #  endif
 #endif // defined(__APPLE__)
 
-#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \
-    (defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) || \
-    (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606))
+#if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) || \
+    !defined(__cpp_aligned_new) || __cpp_aligned_new < 201606
 #  define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55791.178534.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181217/b397ac29/attachment.bin>


More information about the libcxx-commits mailing list