[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:46:02 PDT 2024
================
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr(
VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange);
+ if (auto &schema =
+ CGM.getCodeGenOpts().PointerAuth.CXXVTTVTablePointers)
+ Init = CGM.getConstantSignedPointer(Init, schema, nullptr, GlobalDecl(),
----------------
asl wrote:
```suggestion
Init = CGM.getConstantSignedPointer(Init, Schema, nullptr, GlobalDecl(),
```
https://github.com/llvm/llvm-project/pull/94056
More information about the llvm-branch-commits
mailing list