File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
llvm/include/llvm/CodeGen Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class Register {
3838 " Reg isn't large enough to hold full range." );
3939 static constexpr unsigned MaxFrameIndexBitwidth = 30 ;
4040 static constexpr unsigned FirstStackSlot = 1u << MaxFrameIndexBitwidth;
41- static const unsigned StackSlotMask =
41+ static constexpr const unsigned StackSlotMask =
4242 (unsigned )(-1 ) >> (CHAR_BIT * sizeof (unsigned ) - MaxFrameIndexBitwidth);
4343 static_assert (FirstStackSlot >= MCRegister::LastPhysicalReg);
4444 static constexpr unsigned VirtualRegFlag = 1u << 31 ;
@@ -91,7 +91,7 @@ class Register {
9191 // / Compute the frame index from a register value representing a stack slot.
9292 int stackSlotIndex () const {
9393 assert (isStack () && " Not a stack slot" );
94- return static_cast <int >(SignExtend64 (Reg & Register::StackSlotMask, 30 ));
94+ return static_cast <int >(SignExtend64< 30 > (Reg & Register::StackSlotMask));
9595 }
9696
9797 constexpr operator unsigned () const { return Reg; }
You can’t perform that action at this time.
0 commit comments