[libcxxabi] [llvm] [libc++abi] Avoid raw calls to assert() in libc++abi (PR #71121)

Konstantin Varlamov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 16:37:22 PDT 2023


================
@@ -142,7 +142,7 @@ void* fallback_malloc(size_t len) {
 
     // Check the invariant that all heap_nodes pointers 'p' are aligned
     // so that 'p + 1' has an alignment of at least RequiredAlignment
-    assert(reinterpret_cast<size_t>(p + 1) % RequiredAlignment == 0);
+    _LIBCPP_ASSERT_UNCATEGORIZED(reinterpret_cast<size_t>(p + 1) % RequiredAlignment == 0, "");
----------------
var-const wrote:

Why are we not using `DEMANGLE_ASSERT` in this file?

https://github.com/llvm/llvm-project/pull/71121


More information about the llvm-commits mailing list