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

Oliver Hunt via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 8 15:03:57 PST 2024


================
@@ -51,6 +51,21 @@
 #include <atomic>
 #endif
 
+#if __has_feature(ptrauth_calls)
+#include <ptrauth.h>
+#endif
+
+
+template<typename T>
+static inline
+T *
+get_vtable(T *vtable) {
+#if __has_feature(ptrauth_calls)
----------------
ojhunt wrote:

Hmmm, it may be possible for __builtin_get_vtable() to be used as instead, but I'm not sure what the considerations were when this code was written (or if it predates that builtin?)

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


More information about the libcxx-commits mailing list