[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

Daniil Kovalev via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 4 22:57:36 PDT 2024


================
@@ -0,0 +1,87 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s  -o - | FileCheck %s
+
+#include <ptrauth.h>
+
+// Constant initializers for data pointers.
+extern int external_int;
+
+// CHECK: @g1 = global ptr ptrauth (ptr @external_int, i32 1, i64 56)
+int * __ptrauth(1,0,56) g1 = &external_int;
----------------
kovdan01 wrote:

Just for my information: how are discriminators chosen in this file? Are these just random different integers, or do these values have any special meaning (beside being different from each other so we can distinguish them)?

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


More information about the cfe-commits mailing list