File tree 1 file changed +2
-2
lines changed
llvm/include/llvm/CodeGen
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class Register {
51
51
// / Compute the frame index from a register value representing a stack slot.
52
52
static int stackSlot2Index (Register Reg) {
53
53
assert (Reg.isStack () && " Not a stack slot" );
54
- return int (Reg - MCRegister::FirstStackSlot);
54
+ return int (Reg. id () - MCRegister::FirstStackSlot);
55
55
}
56
56
57
57
// / Convert a non-negative frame index to a stack slot register value.
@@ -76,7 +76,7 @@ class Register {
76
76
// / The first virtual register in a function will get the index 0.
77
77
static unsigned virtReg2Index (Register Reg) {
78
78
assert (Reg.isVirtual () && " Not a virtual register" );
79
- return Reg & ~MCRegister::VirtualRegFlag;
79
+ return Reg. id () & ~MCRegister::VirtualRegFlag;
80
80
}
81
81
82
82
// / Convert a 0-based index to a virtual register number.
You can’t perform that action at this time.
0 commit comments