These changes fix minor issues that cause compilation errors with our
C++ toolchain's stricter default settings:
* `Exception.cpp`: The return type of `__cxa_begin_catch` should be
`void *`, not `void` (see https://libcxxabi.llvm.org/spec.html).
* `Leaks.mm`: `''` is not a valid C char literal; use `'\0'` instead.
We shouldn't call `__cxa_begin_catch` if built with `-fno-exceptions`,
because it's possible that the environment we're in won't include
the `__cxa_begin_catch` routine.
rdar://122995672
The other new runtime functions appear to have a leading underscore.
It makes sense in this case because we don't expect anything to call
this directly (other than the unwinder).
rdar://120952971
The previous approach was effectively to catch the exception and then
run a trap instruction. That has the unfortunate feature that we end
up with a crash at the catch site, not at the throw site, which leaves
us with very little information about which exception was thrown or
where from.
(Strictly we do have the exception pointer and could obtain exception
information, but it still won't tell us what threw it.)
Instead of that, set a personality function for Swift functions that
call potentially throwing code, and have that personality function
trap the exception during phase 1 (i.e. *before* the original stack
has been unwound).
rdar://120952971