Revert "[libc++] Remove trailing newline from _LIBCPP_ASSERTION_HANDLER calls" (#144615)
Reverts llvm/llvm-project#143573
This commit is contained in:
committed by
GitHub
parent
f25f2f7de4
commit
fd7e46b864
@@ -20,8 +20,8 @@
|
||||
#define _LIBCPP_ASSERT(expression, message) \
|
||||
(__builtin_expect(static_cast<bool>(expression), 1) \
|
||||
? (void)0 \
|
||||
: _LIBCPP_ASSERTION_HANDLER( \
|
||||
__FILE__ ":" _LIBCPP_TOSTRING(__LINE__) ": assertion " _LIBCPP_TOSTRING(expression) " failed: " message))
|
||||
: _LIBCPP_ASSERTION_HANDLER(__FILE__ ":" _LIBCPP_TOSTRING(__LINE__) ": assertion " _LIBCPP_TOSTRING( \
|
||||
expression) " failed: " message "\n"))
|
||||
|
||||
// WARNING: __builtin_assume can currently inhibit optimizations. Only add assumptions with a clear
|
||||
// optimization intent. See https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609 for a
|
||||
|
||||
@@ -30,9 +30,6 @@ _LIBCPP_WEAK void __libcpp_verbose_abort(char const* format, ...) noexcept {
|
||||
va_list list;
|
||||
va_start(list, format);
|
||||
std::vfprintf(stderr, format, list);
|
||||
// Callers of `__libcpp_verbose_abort` do not include a newline but when
|
||||
// writing the message to stderr we need to include one.
|
||||
std::fputc('\n', stderr);
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ void std::__libcpp_verbose_abort(char const* format, ...) noexcept {
|
||||
|
||||
std::fprintf(stderr, "%s\n", Marker);
|
||||
std::vfprintf(stderr, format, args);
|
||||
std::fprintf(stderr, "\n%s", Marker);
|
||||
std::fprintf(stderr, "%s", Marker);
|
||||
|
||||
va_end(args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user