[libcxx-commits] [libcxx] [libcxxabi] [libc++][libc++abi] Minor follow-up changes after ptrauth upstreaming (PR #87481)
Daniil Kovalev via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 24 11:18:59 PDT 2024
================
@@ -275,13 +275,15 @@ struct __type_info_implementations {
__impl;
};
-# if defined(__arm64__) && __has_cpp_attribute(clang::ptrauth_vtable_pointer)
-# if __has_feature(ptrauth_type_info_discriminated_vtable_pointer)
+# if __has_cpp_attribute(_Clang::__ptrauth_vtable_pointer__) && __has_feature(__ptrauth_calls__)
+# if __has_feature(__ptrauth_vtable_address_discrimination__) || \
+ __has_feature(__ptrauth_vtable_type_discrimination__)
----------------
kovdan01 wrote:
@ldionne @ahmedbougacha @asl
**Update.** My preference is the following:
1. Do not check arm64/aarch64. If in future we have ptrauth support on non-arm64, for example, via soft pointer auth, the conditions will remain the same. Since we don't have different logic for ptrauth+non-arm64, no need for additional check.
2. Do not check against `ptrauth_calls`. The `[[clang::ptrauth_vtable_pointer]]` attribute has no effect w/o `ptrauth_calls` enabled.
3. If we want to introduce `__has_feature(ptrauth_type_info_discriminated_vtable_pointer)`, @ahmedbougacha please update your branch to include changes allowing such discrimination - now there is no support on clang side.
https://github.com/llvm/llvm-project/pull/87481
More information about the libcxx-commits
mailing list