}
-MachineInstr* ilist_traits<MachineInstr>::createNode() {
+MachineInstr* ilist_traits<MachineInstr>::createSentinel() {
MachineInstr* dummy = new MachineInstr(0, 0);
LeakDetector::removeGarbageObject(dummy);
return dummy;
OS << "\t";
I->print(OS, &getParent()->getTarget());
}
+
+ // Print the successors of this block according to the CFG.
+ if (!succ_empty()) {
+ OS << " Successors according to CFG:";
+ for (const_succ_iterator SI = succ_begin(), E = succ_end(); SI != E; ++SI)
+ OS << " " << *SI;
+ OS << "\n";
+ }
}
void MachineBasicBlock::addSuccessor(MachineBasicBlock *succ) {
}
void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) {
- std::vector<MachineBasicBlock *>::iterator I =
+ std::vector<MachineBasicBlock *>::iterator I =
std::find(Predecessors.begin(), Predecessors.end(), pred);
assert(I != Predecessors.end() && "Pred is not a predecessor of this block!");
Predecessors.erase(I);