[llvm] [RISCV] Remove null terminator from CSRegs in determineCalleeSaves. NFC (PR #74131)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 11:16:10 PST 2023
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 8c1d476db0ac73df44b1b9db66fdac45473dea68 a4270f9f9cf843ba21266ba04454ba7072194fdc -- llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index 8dfea6d386..8634b58fe0 100644
--- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -977,11 +977,12 @@ void RISCVFrameLowering::determineCalleeSaves(MachineFunction &MF,
if (MF.getFunction().hasFnAttribute("interrupt") && MFI.hasCalls()) {
- static const MCPhysReg CSRegs[] = { RISCV::X1, /* ra */
- RISCV::X5, RISCV::X6, RISCV::X7, /* t0-t2 */
- RISCV::X10, RISCV::X11, /* a0-a1, a2-a7 */
- RISCV::X12, RISCV::X13, RISCV::X14, RISCV::X15, RISCV::X16, RISCV::X17,
- RISCV::X28, RISCV::X29, RISCV::X30, RISCV::X31 /* t3-t6 */
+ static const MCPhysReg CSRegs[] = {
+ RISCV::X1, /* ra */
+ RISCV::X5, RISCV::X6, RISCV::X7, /* t0-t2 */
+ RISCV::X10, RISCV::X11, /* a0-a1, a2-a7 */
+ RISCV::X12, RISCV::X13, RISCV::X14, RISCV::X15, RISCV::X16,
+ RISCV::X17, RISCV::X28, RISCV::X29, RISCV::X30, RISCV::X31 /* t3-t6 */
};
for (auto Reg : CSRegs)
``````````
</details>
https://github.com/llvm/llvm-project/pull/74131
More information about the llvm-commits
mailing list