[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)
Anatoly Trosinenko via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 4 06:46:54 PDT 2025
================
@@ -4652,6 +4659,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) {
"", Resolver, &getModule());
GIF->setName(ResolverName);
SetCommonAttributes(FD, GIF);
+ SetResolverAttrs(cast<llvm::Function>(*Resolver));
----------------
atrosinenko wrote:
Reused `setTargetAttributes`, thank you! If I understand it correctly, it should be safer not to pass any `Decl` to `setTargetAttributes`, as otherwise the implementation might inspect target-specific function attributes and use them for the resolver (which can correspond to one or multiple declarations), and we want to only set the bare minimum attributes instead.
https://github.com/llvm/llvm-project/pull/141573
More information about the cfe-commits
mailing list