Before C++17, throw() was equivalent to wrapping the function in a try {} catch
{ std::unexpected(); }. In C++17 throw() was made equivalent to noexcept and
in C++20 throw() was removed.
The supporting framework around LLVM will make sure to only compute values once if they
are known to never change. Previously, these values were attempted to be reused from places where
the users may not dominate the creation of the value. To avoid that, they are always created
in the entry block now.
Implementation Notes:
- To avoid setjmp, longjmp, and the mess that those create, we instead set the interrupting
context of the signal handler to return into the `throw_trap` routine. To my surprise,
this actually works. The stack ends up getting unwound normally and the memory-oob error
is caught by the trampoline.
Additional info:
- Execution is turned off, this is just to make sure the backend can compile the entire specsuite.
- That being said, trampolines are implemented and protected call works (just doesn't protect).