@@ -71,7 +71,7 @@ class MCRegisterClass {
7171 // / contains - Return true if the specified register is included in this
7272 // / register class. This does not include virtual registers.
7373 bool contains (MCRegister Reg) const {
74- unsigned RegNo = unsigned ( Reg);
74+ unsigned RegNo = Reg. id ( );
7575 unsigned InByte = RegNo % 8 ;
7676 unsigned Byte = RegNo / 8 ;
7777 if (Byte >= RegSetSize)
@@ -188,7 +188,7 @@ class MCRegisterInfo {
188188 DenseMap<MCRegister, int > L2CVRegs; // LLVM to CV regs mapping
189189
190190 mutable std::vector<std::vector<MCPhysReg>> RegAliasesCache;
191- ArrayRef<MCPhysReg> getCachedAliasesOf (MCPhysReg R) const ;
191+ ArrayRef<MCPhysReg> getCachedAliasesOf (MCRegister R) const ;
192192
193193 // / Iterator class that can traverse the differentially encoded values in
194194 // / DiffLists. Don't use this class directly, use one of the adaptors below.
@@ -358,16 +358,16 @@ class MCRegisterInfo {
358358 return PCReg;
359359 }
360360
361- const MCRegisterDesc &operator [](MCRegister RegNo ) const {
362- assert (RegNo < NumRegs &&
361+ const MCRegisterDesc &operator [](MCRegister Reg ) const {
362+ assert (Reg. id () < NumRegs &&
363363 " Attempting to access record for invalid register number!" );
364- return Desc[RegNo ];
364+ return Desc[Reg. id () ];
365365 }
366366
367367 // / Provide a get method, equivalent to [], but more useful with a
368368 // / pointer to this object.
369- const MCRegisterDesc &get (MCRegister RegNo ) const {
370- return operator [](RegNo );
369+ const MCRegisterDesc &get (MCRegister Reg ) const {
370+ return operator [](Reg );
371371 }
372372
373373 // / Returns the physical register number of sub-register "Index"
@@ -457,11 +457,11 @@ class MCRegisterInfo {
457457 return RegClassStrings + Class->NameIdx ;
458458 }
459459
460- // / Returns the encoding for RegNo
461- uint16_t getEncodingValue (MCRegister RegNo ) const {
462- assert (RegNo < NumRegs &&
460+ // / Returns the encoding for Reg
461+ uint16_t getEncodingValue (MCRegister Reg ) const {
462+ assert (Reg. id () < NumRegs &&
463463 " Attempting to get encoding for invalid register number!" );
464- return RegEncodingTable[RegNo ];
464+ return RegEncodingTable[Reg. id () ];
465465 }
466466
467467 // / Returns true if RegB is a sub-register of RegA.
0 commit comments