summaryrefslogtreecommitdiff
path: root/pstl
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2022-05-19 13:10:37 +0200
committerNikolas Klauser <nikolasklauser@berlin.de>2022-05-20 16:58:21 +0200
commit64748efc27406244496e0c2ee6714e76b794c277 (patch)
treef81b9c4098f3c6a48ee7aaead68b4844016e8cd7 /pstl
parent0443bfabe7ba0bc5365a34de14ab8d108d2f0cd0 (diff)
downloadllvm-64748efc27406244496e0c2ee6714e76b794c277.tar.gz
[libc++] Use _LIBCPP_ASSERT by default for _PSTL_ASSERTions
Reviewed By: ldionne, #libc Spies: jwakely, rodgert, libcxx-commits Differential Revision: https://reviews.llvm.org/D125634
Diffstat (limited to 'pstl')
-rw-r--r--pstl/include/pstl/internal/pstl_config.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/pstl/include/pstl/internal/pstl_config.h b/pstl/include/pstl/internal/pstl_config.h
index 80a1f9a882bb..ad0cb5d312b4 100644
--- a/pstl/include/pstl/internal/pstl_config.h
+++ b/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