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

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 11 11:44:49 PDT 2025


================
@@ -2850,6 +2850,26 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp
   if (Quals.hasUnaligned())
     mangleVendorQualifier("__unaligned");
 
+  // __ptrauth.  Note that this is parameterized.
+  if (PointerAuthQualifier PtrAuth = Quals.getPointerAuth()) {
----------------
ahatanak wrote:

Demangling already works for Itanium, though the qualifier might appear a little odd (it resembles a template instantiation).

For example:

```
$ ./bin/llvm-cxxfilt __Z3fooPU9__ptrauthILj1ELb0ELj23EEPi
foo(int* __ptrauth<1u, false, 23u>*)
```

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


More information about the cfe-commits mailing list