================
@@ -43,6 +43,104 @@
   #define LIBUNWIND_AVAIL
 #endif
 
+#if __has_feature(ptrauth_calls)
+
+  #include <ptrauth.h>
+
+  #if __has_extension(ptrauth_restricted_intptr_qualifier)
----------------
kovdan01 wrote:

Let's add a comment explaining that we need that because of Apple's fork so 
people unaware of the problem would know why such checks are needed.

The comment might look like this:

```
// In Apple's fork of clang, `__ptrauth` qualifier can be only applied to
// pointer types, and `__ptrauth_restricted_intptr` is used instead for
// integer types. In mainline clang, we only have `__ptrauth` which could
// be applied both to pointer and integer types.
// These helper macros allow seemless build of runtime libraries with
// Apple's fork of clang.
// TODO: If/when Apple's clang switches to mainline way of using
// `__ptrauth` qualifier, get rid of these conditionals.
```

https://github.com/llvm/llvm-project/pull/143230
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to