Skip to content

Commit a6e94ab

Browse files
committed
[Basic] Fallback to dumping to stderr when backtracing is disabled
Make sure we still output the error message when pretty backtracing is disabled.
1 parent d672f75 commit a6e94ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Basic/Assertions.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ static void _abortWithMessage(llvm::StringRef message) {
120120
// crash reporter.
121121
PrettyStackTraceMultilineString trace(message);
122122

123+
// If pretty backtracing is disabled, fall back to dumping to stderr.
124+
if (!llvm::SavePrettyStackState())
125+
llvm::errs() << message << '\n';
126+
123127
abort();
124128
}
125129

0 commit comments

Comments
 (0)