[libcxx-commits] [libcxx] [libcxxabi] [libc++] Upstream ptrauth support in libc++ and libc++abi (PR #84573)

Ahmed Bougacha via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 8 15:58:00 PST 2024


================
@@ -276,7 +276,19 @@ struct __type_info_implementations {
           __impl;
 };
 
-class _LIBCPP_EXPORTED_FROM_ABI type_info {
+#    if defined(__arm64__) && __has_cpp_attribute(clang::ptrauth_vtable_pointer)
----------------
ahmedbougacha wrote:

Separately, to support ELF platforms that don't define `__arm64__` we ended up rewriting the feature check as:
```
+#if __has_feature(ptrauth_calls) &&                          \
+    (__has_feature(ptrauth_vtable_address_discrimination) || \
+     __has_feature(ptrauth_vtable_type_discrimination)) &&   \
+    __has_cpp_attribute(clang::ptrauth_vtable_pointer)
```

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


More information about the libcxx-commits mailing list