[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
Fri Jun 7 23:41:40 PDT 2024


================
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr &Vptr) {
   // the same addr space. Note that this might not be LLVM address space 0.
   VTableField = VTableField.withElementType(PtrTy);
 
+  if (auto authenticationInfo = CGM.getVTablePointerAuthInfo(
+          this, Vptr.Base.getBase(), VTableField.emitRawPointer(*this))) {
+    VTableAddressPoint =
+        EmitPointerAuthSign(*authenticationInfo, VTableAddressPoint);
----------------
asl wrote:

```suggestion
        EmitPointerAuthSign(*AuthenticationInfo, VTableAddressPoint);
```

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


More information about the llvm-branch-commits mailing list