diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2024-02-05 11:21:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 11:21:27 -0500 |
commit | 58f3a77efb633d56a48e031240fc8a37ba2b7557 (patch) | |
tree | e5768c5cb7b05bf8f2342595f196527c2a54d1d5 /libcxxabi | |
parent | c08d972a0043fe67de65ba331a144425c8cea449 (diff) | |
download | llvm-58f3a77efb633d56a48e031240fc8a37ba2b7557.zip llvm-58f3a77efb633d56a48e031240fc8a37ba2b7557.tar.gz llvm-58f3a77efb633d56a48e031240fc8a37ba2b7557.tar.bz2 |
[libc++abi] Replace usage of raw assert by _LIBCXXABI_ASSERT (#80689)
We strive not to use raw assert(...) anymore in libc++abi in preparation
for using the hardening framework.
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/src/private_typeinfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxxabi/src/private_typeinfo.cpp b/libcxxabi/src/private_typeinfo.cpp index 857ae25..5c68f3e 100644 --- a/libcxxabi/src/private_typeinfo.cpp +++ b/libcxxabi/src/private_typeinfo.cpp @@ -44,9 +44,9 @@ #include <cstdint> #include <cassert> #include <string.h> +#include "abort_message.h" #ifdef _LIBCXXABI_FORGIVING_DYNAMIC_CAST -#include "abort_message.h" #include <sys/syslog.h> #include <atomic> #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); |