[Basic] Handle multiline strings in abortWithPrettyStackTraceMessage

Improve the formatting by indenting to match the rest of the
pretty stack trace.
This commit is contained in:
Hamish Knight
2025-05-19 20:55:01 +01:00
parent 742a96da86
commit d46aec9f00
2 changed files with 28 additions and 5 deletions

View File

@@ -51,13 +51,15 @@ public:
};
/// Aborts the program, printing a given message to a PrettyStackTrace frame
/// before exiting.
/// before exiting. This should be preferred over manually logging to stderr and
/// aborting since that won't be picked up by the crash reporter.
[[noreturn]]
void abortWithPrettyStackTraceMessage(
llvm::function_ref<void(llvm::raw_ostream &)> message);
/// Aborts the program, printing a given message to a PrettyStackTrace frame
/// before exiting.
/// before exiting. This should be preferred over manually logging to stderr and
/// aborting since that won't be picked up by the crash reporter.
[[noreturn]]
void abortWithPrettyStackTraceMessage(llvm::StringRef message);