When hitting an lldbassert in a non-assert build, we emit a blurb including the assertion, the triggering file and line and a pretty backtrace leading up to the issue. Currently, this emitted to stderr. That's fine for the command line, but when used as library, for example from Xcode or VSCode, this information doesn't make it to the user. This patch redirects these messages to use the diagnostic infrastructure so they're emitted as diagnostic events.
The patch is slightly more complicated than I would've liked because of layering. lldbassert is part of Utility while the diagnostics are implemented in Core.
.