Constify arguments in isSuccessor and isLayoutSuccessor.
llvm-svn: 68054
This commit is contained in:
@@ -248,13 +248,13 @@ void MachineBasicBlock::transferSuccessors(MachineBasicBlock *fromMBB)
|
||||
fromMBB->removeSuccessor(fromMBB->succ_begin());
|
||||
}
|
||||
|
||||
bool MachineBasicBlock::isSuccessor(MachineBasicBlock *MBB) const {
|
||||
bool MachineBasicBlock::isSuccessor(const MachineBasicBlock *MBB) const {
|
||||
std::vector<MachineBasicBlock *>::const_iterator I =
|
||||
std::find(Successors.begin(), Successors.end(), MBB);
|
||||
return I != Successors.end();
|
||||
}
|
||||
|
||||
bool MachineBasicBlock::isLayoutSuccessor(MachineBasicBlock *MBB) const {
|
||||
bool MachineBasicBlock::isLayoutSuccessor(const MachineBasicBlock *MBB) const {
|
||||
MachineFunction::const_iterator I(this);
|
||||
return next(I) == MachineFunction::const_iterator(MBB);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user