mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user