Skip to content

Commit a205551

Browse files
committed
Make naot's lastDwarfRegNum constexpr
1 parent b9beefa commit a205551

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct Registers_REGDISPLAY : REGDISPLAY
175175
inline bool validFloatRegister(int) { return false; }
176176
inline bool validVectorRegister(int) { return false; }
177177

178-
inline static int lastDwarfRegNum() { return 16; }
178+
static constexpr int lastDwarfRegNum() { return 16; }
179179

180180
inline bool validRegister(int regNum) const
181181
{
@@ -297,7 +297,7 @@ struct Registers_REGDISPLAY : REGDISPLAY
297297
inline bool validFloatRegister(int) { return false; }
298298
inline bool validVectorRegister(int) { return false; }
299299

300-
inline static int lastDwarfRegNum() { return 16; }
300+
static constexpr int lastDwarfRegNum() { return 16; }
301301

302302
inline bool validRegister(int regNum) const
303303
{
@@ -336,7 +336,7 @@ struct Registers_REGDISPLAY : REGDISPLAY
336336
struct Registers_REGDISPLAY : REGDISPLAY
337337
{
338338
inline static int getArch() { return libunwind::REGISTERS_ARM; }
339-
inline static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM; }
339+
static constexpr int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM; }
340340

341341
bool validRegister(int num) const;
342342
bool validFloatRegister(int num) const;
@@ -533,7 +533,7 @@ void Registers_REGDISPLAY::setFloatRegister(int num, double value)
533533
struct Registers_REGDISPLAY : REGDISPLAY
534534
{
535535
inline static int getArch() { return libunwind::REGISTERS_ARM64; }
536-
inline static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64; }
536+
static constexpr int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64; }
537537

538538
bool validRegister(int num) const;
539539
bool validFloatRegister(int num) { return false; };
@@ -816,7 +816,7 @@ void Registers_REGDISPLAY::setVectorRegister(int num, libunwind::v128 value)
816816
struct Registers_REGDISPLAY : REGDISPLAY
817817
{
818818
inline static int getArch() { return libunwind::REGISTERS_LOONGARCH; }
819-
inline static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_LOONGARCH; }
819+
static constexpr int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_LOONGARCH; }
820820

821821
bool validRegister(int num) const;
822822
bool validFloatRegister(int num) { return false; };
@@ -1096,7 +1096,7 @@ void Registers_REGDISPLAY::setVectorRegister(int num, libunwind::v128 value)
10961096
struct Registers_REGDISPLAY : REGDISPLAY
10971097
{
10981098
inline static int getArch() { return libunwind::REGISTERS_RISCV; }
1099-
inline static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV; }
1099+
static constexpr int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV; }
11001100

11011101
bool validRegister(int num) const;
11021102
bool validFloatRegister(int num) { return false; };

0 commit comments

Comments
 (0)