Attempt to fix aligned allocation configuration under clang-cl
authorEric Fiselier <eric@efcs.ca>
Mon, 1 Oct 2018 04:08:06 +0000 (04:08 +0000)
committerEric Fiselier <eric@efcs.ca>
Mon, 1 Oct 2018 04:08:06 +0000 (04:08 +0000)
When we're using clang-cl and Microsoft's runtime implementation,
we don't provide align_val_t or aligned new/delete ourselves.

This patch updates the _LIBCPP_HAS_NO_ALIGNED_ALLOCATION macro
to reflect this.

llvm-svn: 343441

libcxx/include/new

index 8d72ba5..7c3076c 100644 (file)
@@ -171,6 +171,10 @@ enum class _LIBCPP_ENUM_VIS align_val_t : size_t { };
 enum align_val_t { __zero = 0, __max = (size_t)-1 };
 #endif
 #endif
+#elif !defined(__cpp_aligned_new)
+// We're defering to Microsoft's STL to provide aligned new et al. We don't
+// have it unless the language feature test macro is defined.
+#define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
 #endif
 
 }  // std