@@ -89,7 +89,7 @@ ArrayRef<MCPhysReg> MCRegisterInfo::getCachedAliasesOf(MCRegister R) const {
8989 return Aliases;
9090
9191 for (MCRegAliasIteratorImpl It (R, this ); It.isValid (); ++It)
92- Aliases.push_back (*It);
92+ Aliases.push_back (( *It). id () );
9393
9494 sort (Aliases);
9595 Aliases.erase (unique (Aliases), Aliases.end ());
@@ -141,15 +141,15 @@ unsigned MCRegisterInfo::getSubRegIndex(MCRegister Reg,
141141 return 0 ;
142142}
143143
144- int64_t MCRegisterInfo::getDwarfRegNum (MCRegister RegNum , bool isEH) const {
144+ int64_t MCRegisterInfo::getDwarfRegNum (MCRegister Reg , bool isEH) const {
145145 const DwarfLLVMRegPair *M = isEH ? EHL2DwarfRegs : L2DwarfRegs;
146146 unsigned Size = isEH ? EHL2DwarfRegsSize : L2DwarfRegsSize;
147147
148148 if (!M)
149149 return -1 ;
150- DwarfLLVMRegPair Key = { RegNum , 0 };
150+ DwarfLLVMRegPair Key = {Reg. id () , 0 };
151151 const DwarfLLVMRegPair *I = std::lower_bound (M, M+Size, Key);
152- if (I == M+ Size || I->FromReg != RegNum )
152+ if (I == M + Size || I->FromReg != Reg )
153153 return -1 ;
154154 // Consumers need to be able to detect -1 and -2, but at various points
155155 // the numbers move between unsigned and signed representations, as well as
@@ -191,20 +191,21 @@ int64_t MCRegisterInfo::getDwarfRegNumFromDwarfEHRegNum(uint64_t RegNum) const {
191191 return RegNum;
192192}
193193
194- int MCRegisterInfo::getSEHRegNum (MCRegister RegNum) const {
195- const DenseMap<MCRegister, int >::const_iterator I = L2SEHRegs.find (RegNum);
196- if (I == L2SEHRegs.end ()) return (int )RegNum;
194+ int MCRegisterInfo::getSEHRegNum (MCRegister Reg) const {
195+ const DenseMap<MCRegister, int >::const_iterator I = L2SEHRegs.find (Reg);
196+ if (I == L2SEHRegs.end ())
197+ return (int )Reg.id ();
197198 return I->second ;
198199}
199200
200- int MCRegisterInfo::getCodeViewRegNum (MCRegister RegNum ) const {
201+ int MCRegisterInfo::getCodeViewRegNum (MCRegister Reg ) const {
201202 if (L2CVRegs.empty ())
202203 report_fatal_error (" target does not implement codeview register mapping" );
203- const DenseMap<MCRegister, int >::const_iterator I = L2CVRegs.find (RegNum );
204+ const DenseMap<MCRegister, int >::const_iterator I = L2CVRegs.find (Reg );
204205 if (I == L2CVRegs.end ())
205- report_fatal_error (" unknown codeview register " + (RegNum < getNumRegs ()
206- ? getName (RegNum )
207- : Twine (RegNum )));
206+ report_fatal_error (" unknown codeview register " + (Reg. id () < getNumRegs ()
207+ ? getName (Reg )
208+ : Twine (Reg. id () )));
208209 return I->second ;
209210}
210211
0 commit comments