[libc++] Improve the implementation of std::unreachable
First, use __builtin_unreachable unconditionally. It is implemented by all the compilers that we support. Clang started supporting it around Clang 4, and GCC around GCC 4.10. Also add _LIBCPP_ASSERT so that we will actually get a guaranteed crash if we reached `std::unreachable()` and assertions have been enabled, since that's UB that's extremely easy to catch. Differential Revision: https://reviews.llvm.org/D131620
Loading
Please sign in to comment