[llvm] [llvm] use 64-bit types for result of getDwarfRegNum (NFC) (PR #109494)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 16:36:54 PDT 2024


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 abc2412f077546066289d0e34c3b499d54337446 c8fbd5830e63d9f6defed936c769ba27ea8cf261 --extensions h,cpp -- llvm/include/llvm/MC/MCRegisterInfo.h llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h llvm/lib/MC/MCRegisterInfo.cpp llvm/lib/Target/Lanai/LanaiRegisterInfo.h
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/MC/MCRegisterInfo.cpp b/llvm/lib/MC/MCRegisterInfo.cpp
index 7d269308b0..178b1d21e5 100644
--- a/llvm/lib/MC/MCRegisterInfo.cpp
+++ b/llvm/lib/MC/MCRegisterInfo.cpp
@@ -159,13 +159,13 @@ int64_t MCRegisterInfo::getDwarfRegNum(MCRegister RegNum, bool isEH) const {
 }
 
 std::optional<MCRegister> MCRegisterInfo::getLLVMRegNum(uint64_t RegNum,
-                                                      bool isEH) const {
+                                                        bool isEH) const {
   const DwarfLLVMRegPair *M = isEH ? EHDwarf2LRegs : Dwarf2LRegs;
   unsigned Size = isEH ? EHDwarf2LRegsSize : Dwarf2LRegsSize;
 
   if (!M)
     return std::nullopt;
-  DwarfLLVMRegPair Key = { unsigned(RegNum), 0 };
+  DwarfLLVMRegPair Key = {unsigned(RegNum), 0};
   const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, Key);
   if (I != M + Size && I->FromReg == RegNum)
     return MCRegister::from(I->ToReg);

``````````

</details>


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


More information about the llvm-commits mailing list