[llvm-branch-commits] [clang] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155492)

Nikita Popov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 26 14:19:02 PDT 2025


================
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
   /// contain data that is address discriminated. This includes
   /// implicitly authenticated values like vtable pointers, as well as
   /// explicitly qualified fields.
-  bool containsAddressDiscriminatedPointerAuth(QualType T) {
+  bool containsAddressDiscriminatedPointerAuth(QualType T) const {
----------------
nikic wrote:

> This has not shipped - llvm21 is the first version of llvm to include any of the pointer auth work.

LLVM 21.1.0 has been released, so all backports from this point on must be ABI compatible.

> That said it's irksome that we don't have a way to indicate that functions are not intended to be API, or that there is no abstraction layer for the API given that ASTContext is used for both internal semantic checks and apparently is part of the API (it did not occur to me that anything here would be directly exposed as API as none of the changes I have made have ever triggered any kind of API review) :-/

This may be possible in the future using ABI annotations, but the clang-side work for that hasn't really started yet.

For the purposes of this backport, you'll have to rewrite this without the const qualifiers.

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


More information about the llvm-branch-commits mailing list