mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Add MCRegisterInfo::RegListIterator.
Also add subclasses MCSubRegIterator, MCSuperRegIterator, and MCRegAliasIterator. These iterators provide an abstract interface to the MCRegisterInfo register lists so the internal representation can be changed without changing all clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -357,10 +357,10 @@ public:
|
||||
|
||||
/// isSuperRegister - Returns true if regB is a super-register of regA.
|
||||
///
|
||||
bool isSuperRegister(unsigned regA, unsigned regB) const {
|
||||
for (const uint16_t *regList = getSuperRegisters(regA); *regList;++regList){
|
||||
if (*regList == regB) return true;
|
||||
}
|
||||
bool isSuperRegister(unsigned RegA, unsigned RegB) const {
|
||||
for (MCSuperRegIterator I(RegA, this); I.isValid(); ++I)
|
||||
if (*I == RegB)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user