================
@@ -2221,13 +2222,19 @@ llvm::Value 
*ItaniumCXXABI::getVTableAddressPointInStructorWithVTT(
       CGF.Builder.CreateAlignedLoad(CGF.GlobalsVoidPtrTy, VTT,
                                     CGF.getPointerAlign());
 
-  if (auto &Schema = 
CGF.CGM.getCodeGenOpts().PointerAuth.CXXVTTVTablePointers) {
-    CGPointerAuthInfo PointerAuth = CGF.EmitPointerAuthInfo(Schema, VTT,
-                                                            GlobalDecl(),
-                                                            QualType());
+  if (auto &Schema = CGM.getCodeGenOpts().PointerAuth.CXXVTTVTablePointers) {
+    llvm::ConstantInt *TypeDesc = nullptr;
+    if (Schema.getOtherDiscrimination() ==
+        PointerAuthSchema::Discrimination::Type)
+      TypeDesc = llvm::ConstantInt::get(
+          CGM.IntPtrTy,
+          CGM.getContext().getPointerAuthVTablePointerDiscriminator(
----------------
ojhunt wrote:

*part of the reason I'm pushing so hard here is that this code is not currently 
handling the case where the vtable signing schema is overridden, which is 
generally an ABI constraint.

Now this runs into a "is this practically relevant?" the arm64e ABI is frozen: 
we can't make a change like this. For ABIs that are not frozen the ABI 
constraint simply isn't relevant - as long as they're always signed this way 
there's no problem that would require the ABI manipulation, so maybe it's fine 
to ignore that?

I'm somewhat on the fence at this point, and the only _strong_ complaint is the 
shared discriminator between vtt entries and the vtable pointer.

https://github.com/llvm/llvm-project/pull/205808
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to