Skip to content

Commit

Permalink
[libc++] Use _LIBCPP_ASSERT by default for _PSTL_ASSERTions
Browse files Browse the repository at this point in the history
Reviewed By: ldionne, #libc

Spies: jwakely, rodgert, libcxx-commits

Differential Revision: https://reviews.llvm.org/D125634
  • Loading branch information
philnik777 committed May 20, 2022
1 parent 0443bfa commit 64748ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pstl/include/pstl/internal/pstl_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64748ef

Please sign in to comment.