[libcxx-commits] [PATCH] D125634: [libc++] Use _LIBCPP_ASSERT by default for _PSTL_ASSERTions

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 19 04:11:27 PDT 2022


philnik updated this revision to Diff 430640.
philnik marked an inline comment as done.
philnik added a comment.

- Use the different approach


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125634/new/

https://reviews.llvm.org/D125634

Files:
  pstl/include/pstl/internal/pstl_config.h


Index: pstl/include/pstl/internal/pstl_config.h
===================================================================
--- pstl/include/pstl/internal/pstl_config.h
+++ pstl/include/pstl/internal/pstl_config.h
@@ -27,7 +27,12 @@
 #    define _PSTL_USAGE_WARNINGS
 #endif
 
-#if !defined(_PSTL_ASSERT)
+#if defined(_LIBCPP_VERSION)
+#    include <__assert>
+#    define _PSTL_ASSERT(pred) _LIBCPP_ASSERT(pred, "")
+#elif defined(__GLIBCXX__)
+#    define _PSTL_ASSERT(pred) __glibcxx_assert(pred)
+#else
 #    include <cassert>
 #    define _PSTL_ASSERT(pred) (assert((pred)))
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125634.430640.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220519/1e453b9f/attachment.bin>


More information about the libcxx-commits mailing list