[Basic] Fallback to dumping to stderr when backtracing is disabled

Make sure we still output the error message when pretty backtracing
is disabled.
This commit is contained in:
Hamish Knight
2025-05-19 20:55:01 +01:00
parent d672f750e7
commit a6e94ab0bd

View File

@@ -120,6 +120,10 @@ static void _abortWithMessage(llvm::StringRef message) {
// crash reporter.
PrettyStackTraceMultilineString trace(message);
// If pretty backtracing is disabled, fall back to dumping to stderr.
if (!llvm::SavePrettyStackState())
llvm::errs() << message << '\n';
abort();
}