Simplify declarations slightly by using typedefs.

llvm-svn: 129720
This commit is contained in:
Eli Friedman 2011-04-18 21:21:37 +00:00
parent b107143fed
commit ec138b4b27
1 changed files with 2 additions and 4 deletions

View File

@ -363,8 +363,7 @@ void MachineBasicBlock::addPredecessor(MachineBasicBlock *pred) {
} }
void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) { void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) {
std::vector<MachineBasicBlock *>::iterator I = pred_iterator I = std::find(Predecessors.begin(), Predecessors.end(), pred);
std::find(Predecessors.begin(), Predecessors.end(), pred);
assert(I != Predecessors.end() && "Pred is not a predecessor of this block!"); assert(I != Predecessors.end() && "Pred is not a predecessor of this block!");
Predecessors.erase(I); Predecessors.erase(I);
} }
@ -402,8 +401,7 @@ MachineBasicBlock::transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB) {
} }
bool MachineBasicBlock::isSuccessor(const MachineBasicBlock *MBB) const { bool MachineBasicBlock::isSuccessor(const MachineBasicBlock *MBB) const {
std::vector<MachineBasicBlock *>::const_iterator I = const_succ_iterator I = std::find(Successors.begin(), Successors.end(), MBB);
std::find(Successors.begin(), Successors.end(), MBB);
return I != Successors.end(); return I != Successors.end();
} }