aboutsummaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorKonstantin Varlamov <varconst@apple.com>2023-02-10 11:31:26 -0800
committerTobias Hieta <tobias@hieta.se>2023-02-13 11:27:59 +0100
commitd19ef5ffce38296f53ed83d932b0b056e13c2a34 (patch)
treeb3ec8f7134a9c737b9d2ccc3f91c11eb0244190a /libcxx
parente171ce96349ada2bb111338e1b319883aa688fb4 (diff)
downloadllvm-d19ef5ffce38296f53ed83d932b0b056e13c2a34.zip
llvm-d19ef5ffce38296f53ed83d932b0b056e13c2a34.tar.gz
llvm-d19ef5ffce38296f53ed83d932b0b056e13c2a34.tar.bz2
[libc++] In tests, use `abort` to terminate upon an error.
Differential Revision: https://reviews.llvm.org/D143245 (cherry picked from commit 8e13ec9eca1fc758c213a94b563221e6afc5b031)
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/support/assert_macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/support/assert_macros.h b/libcxx/test/support/assert_macros.h
index 5d5d810..80076fd 100644
--- a/libcxx/test/support/assert_macros.h
+++ b/libcxx/test/support/assert_macros.h
@@ -65,7 +65,7 @@ std::string test_concat_message([[maybe_unused]] Args&&... args) {
[[noreturn]] void test_log_error(const char* condition, const char* file, int line, std::string&& message) {
const char* msg = condition ? "Assertion failure: " : "Unconditional failure:";
std::fprintf(stderr, "%s%s %s %d\n%s", msg, condition, file, line, message.c_str());
- exit(EXIT_FAILURE);
+ std::abort();
}
inline void test_fail(const char* file, int line, std::string&& message) {