[llvm-branch-commits] [libcxx] d19ef5f - [libc++] In tests, use `abort` to terminate upon an error.

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 13 02:28:28 PST 2023


Author: Konstantin Varlamov
Date: 2023-02-13T11:27:59+01:00
New Revision: d19ef5ffce38296f53ed83d932b0b056e13c2a34

URL: https://github.com/llvm/llvm-project/commit/d19ef5ffce38296f53ed83d932b0b056e13c2a34
DIFF: https://github.com/llvm/llvm-project/commit/d19ef5ffce38296f53ed83d932b0b056e13c2a34.diff

LOG: [libc++] In tests, use `abort` to terminate upon an error.

Differential Revision: https://reviews.llvm.org/D143245

(cherry picked from commit 8e13ec9eca1fc758c213a94b563221e6afc5b031)

Added: 
    

Modified: 
    libcxx/test/support/assert_macros.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/support/assert_macros.h b/libcxx/test/support/assert_macros.h
index 5d5d810446306..80076fd1ba745 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) {


        


More information about the llvm-branch-commits mailing list