[clang] [clang][PAC] Support trivially_relocating polymorphic objects (PR #144420)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 16 12:47:27 PDT 2025


================
@@ -1727,6 +1727,11 @@ ASTContext::PointerAuthContent ASTContext::findPointerAuthContent(QualType T) {
   T = T.getCanonicalType();
   if (T.hasAddressDiscriminatedPointerAuth())
     return PointerAuthContent::AddressDiscriminatedData;
+
+  T = getBaseElementType(T).getCanonicalType();
----------------
ojhunt wrote:

Adding this simplifies the logic in codegen, and to an extent removes a footgun in the form of not requiring every caller to lower the type to the base element prior to calling.

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


More information about the cfe-commits mailing list