[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

Anton Korobeynikov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Jun 8 00:11:36 PDT 2024


================
@@ -841,6 +866,9 @@ void CodeGenVTables::addVTableComponent(ConstantArrayBuilder &builder,
       if (FnAS != GVAS)
         fnPtr =
             llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy);
+      if (auto &schema =
+          CGM.getCodeGenOpts().PointerAuth.CXXVirtualFunctionPointers)
+        return builder.addSignedPointer(fnPtr, schema, GD, QualType());
----------------
asl wrote:

```suggestion
        return builder.addSignedPointer(fnPtr, Schema, GD, QualType());
```

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


More information about the llvm-branch-commits mailing list