[llvm] [AArch64][PAC] Protect the entire function if pac-ret+leaf is passed (PR #140895)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 13:14:35 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/lib/Target/AArch64/AArch64FrameLowering.cpp llvm/lib/Target/AArch64/AArch64FrameLowering.h llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
index 028abd4f2..15b11b68c 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -711,7 +711,8 @@ static void emitCalleeSavedRestores(MachineBasicBlock &MBB,
 
   // If pac-ret+leaf is in effect, ".cfi_restore w30" is emitted near
   // PAUTH_EPILOGUE pseudo instruction by emitPacRetPlusLeafHardening().
-  bool ShouldSkipLR = MF.getInfo<AArch64FunctionInfo>()->shouldSignReturnAddressEverywhere();
+  bool ShouldSkipLR =
+      MF.getInfo<AArch64FunctionInfo>()->shouldSignReturnAddressEverywhere();
 
   for (const auto &Info : CSI) {
     if (ShouldSkipLR && Info.getReg() == AArch64::LR)

``````````

</details>


https://github.com/llvm/llvm-project/pull/140895


More information about the llvm-commits mailing list