================
@@ -92,10 +91,26 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange);
if (const auto &Schema =
- CGM.getCodeGenOpts().PointerAuth.CXXVTTVTablePointers)
- Init = CGM.getConstantSignedPointer(Init, Schema, nullptr, GlobalDecl(),
- QualType());
-
+ CGM.getCodeGenOpts().PointerAuth.CXXVTTVTablePointers) {
+ llvm::Constant *AddressDesc =
+ Schema.isAddressDiscriminated()
+ ? llvm::ConstantExpr::getGetElementPtr(
+ VTT->getType(), VTT,
+ llvm::ConstantInt::get(CGM.Int32Ty, Idx))
+ : nullptr;
+ if (Schema.getOtherDiscrimination() ==
----------------
chbessonova wrote:
I agree it may be a bit too straightforward, but I couldn't come up with a
cleaner approach. Did you have something specific in mind?
https://github.com/llvm/llvm-project/pull/205808
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits