DwarfWriter reading basic type information from llvm-gcc4 code.
[oota-llvm.git] / lib / CodeGen / MachineBasicBlock.cpp
index 6b6fcae1252576224210c513569ffb28766b2f0f..ee8da6744e31f71cfac392809a942d283f2e3aaf 100644 (file)
@@ -46,7 +46,7 @@ void ilist_traits<MachineBasicBlock>::removeNodeFromList(MachineBasicBlock* N) {
 }
 
 
-MachineInstr* ilist_traits<MachineInstr>::createNode() {
+MachineInstr* ilist_traits<MachineInstr>::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) {
@@ -125,7 +133,7 @@ void MachineBasicBlock::addPredecessor(MachineBasicBlock *pred) {
 }
 
 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);