[libc++] Use __builtin_expect and __builtin_assume in _LIBCPP_ASSERT

Since we expect the condition to be true most of the time, we might
as well tell the compiler. And when assertions are disabled, we
might as well tell the compiler that it's allowed to assume that
the condition holds.

Differential Revision: https://reviews.llvm.org/D122397

GitOrigin-RevId: f0799465b2cc25738d7164774926a8ba3a63b98d
3 files changed