[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)
Oliver Hunt via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 10 13:14:42 PDT 2024
================
@@ -7037,8 +7036,64 @@ void ItaniumMangleContextImpl::mangleCXXDtorComdat(const CXXDestructorDecl *D,
Mangler.mangle(GlobalDecl(D, Dtor_Comdat));
}
+static void mangleOverrideDiscrimination(CXXNameMangler &mangler,
+ ASTContext &context,
+ const ThunkInfo &thunk) {
+ auto &langOpts = context.getLangOpts();
+ auto thisType = thunk.ThisType;
+ auto thisRecord = thisType->getPointeeCXXRecordDecl();
+ auto ptrauthClassRecord = context.baseForVTableAuthentication(thisRecord);
+ unsigned typedDiscriminator =
+ context.getPointerAuthVTablePointerDiscriminator(thisRecord);
+ mangler.mangleVendorQualifier("__vtptrauth");
+ auto &manglerStream = mangler.getStream();
+ manglerStream << "I";
+ if (auto explicitAuth =
+ ptrauthClassRecord->getAttr<VTablePointerAuthenticationAttr>()) {
+ manglerStream << "Lj" << explicitAuth->getKey();
----------------
ojhunt wrote:
I'll see what I can find
https://github.com/llvm/llvm-project/pull/94056
More information about the llvm-branch-commits
mailing list