From cca54ee4ba6813c17fac3550340ac3c79cbe8186 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 5 Feb 2024 09:43:51 -0500 Subject: [PATCH] [libc++abi] Replace usage of raw assert by _LIBCXXABI_ASSERT We strive not to use raw assert(...) anymore in libc++abi in preparation for using the hardening framework. --- libcxxabi/src/private_typeinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxxabi/src/private_typeinfo.cpp b/libcxxabi/src/private_typeinfo.cpp index 857ae25b7028d..5c68f3e994cd9 100644 --- a/libcxxabi/src/private_typeinfo.cpp +++ b/libcxxabi/src/private_typeinfo.cpp @@ -44,9 +44,9 @@ #include #include #include +#include "abort_message.h" #ifdef _LIBCXXABI_FORGIVING_DYNAMIC_CAST -#include "abort_message.h" #include #include #endif @@ -470,7 +470,7 @@ __class_type_info::can_catch(const __shim_type_info* thrown_type, if (thrown_class_type == 0) return false; // bullet 2 - assert(adjustedPtr && "catching a class without an object?"); + _LIBCXXABI_ASSERT(adjustedPtr, "catching a class without an object?"); __dynamic_cast_info info = {thrown_class_type, 0, this, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true, nullptr}; info.number_of_dst_type = 1; thrown_class_type->has_unambiguous_public_base(&info, adjustedPtr, public_path);