[clang] [llvm] [Clang][AArch64] Command-line options for A-profile's Sign Return Address Hardening (PR #176171)
Victor Campos via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 09:58:35 PDT 2026
================
@@ -216,16 +216,29 @@ void TargetCodeGenInfo::setBranchProtectionFnAttributes(
// Called on already created and initialized function where attributes already
// set from command line attributes but some might need to be removed as the
// actual BPI is different.
+
if (BPI.SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) {
F.addFnAttr("sign-return-address", BPI.getSignReturnAddrStr());
F.addFnAttr("sign-return-address-key", BPI.getSignKeyStr());
+ if (BPI.SignReturnAddressHardening !=
+ LangOptions::SignReturnAddressHardeningKind::None)
+ F.addFnAttr("sign-return-address-harden",
+ BPI.getSignReturnAddressHardeningStr());
----------------
vhscampos wrote:
Done. Thank you
https://github.com/llvm/llvm-project/pull/176171
More information about the llvm-commits
mailing list