X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FMachineBasicBlock.cpp;h=695ba13a49ddf58bc7880ebf9c76696380880e4f;hb=ef9531efedd2233269f670227fb0e6aae7480d53;hp=a69d1580a35b9e2325a07b8a9992c744cd2e000e;hpb=9d5d7598db72c00a0fb89dc77198e4f6ebc5294d;p=oota-llvm.git diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index a69d1580a35..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::createSentinal() { +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) {