X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FMachineBasicBlock.cpp;h=695ba13a49ddf58bc7880ebf9c76696380880e4f;hb=151c80be8180a7a0aa1594848699aa6b678b3998;hp=6b6fcae1252576224210c513569ffb28766b2f0f;hpb=52c09d76564d6fb24444c4d56bc8978e042e72f9;p=oota-llvm.git diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index 6b6fcae1252..695ba13a49d 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -46,7 +46,7 @@ void ilist_traits::removeNodeFromList(MachineBasicBlock* N) { } -MachineInstr* ilist_traits::createNode() { +MachineInstr* ilist_traits::createSentinel() { MachineInstr* dummy = new MachineInstr(0, 0); LeakDetector::removeGarbageObject(dummy); return dummy; @@ -100,6 +100,14 @@ void MachineBasicBlock::print(std::ostream &OS) const { 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) {