The reason libc++ implemented a throwing debug mode handler was for ease of testing. Specifically,
I thought that if a debug violation aborted, we could only test one violation per file. This made
it impossible to test debug mode. Which throwing behavior we could test more!
However, the throwing approach didn't work either, since there are debug violations underneath noexcept
functions. This lead to the introduction of _NOEXCEPT_DEBUG, which was only noexcept when debug
mode was off.
Having thought more and having grown wiser, _NOEXCEPT_DEBUG was a horrible decision. It was
viral, it didn't cover all the cases it needed to, and it was observable to the user -- at worst
changing the behavior of their program.
This patch removes the throwing debug handler, and rewrites the debug tests using 'fork-ing' style death tests.
Also, this "ABI break" is fine as far as Apple is concerned because we don't ship the debug mode in our dylib. So this is not an ABI break for us.