Re-apply LiveInterval index dumping patch, with fixes suggested by Bill
and others.

llvm-svn: 78003
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 858f403..2e9303a 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -218,7 +218,8 @@
   print(*cerr.stream());
 }
 
-void MachineFunction::print(std::ostream &OS) const {
+void MachineFunction::print(std::ostream &OS,
+                            const PrefixPrinter &prefix) const {
   OS << "# Machine code for " << Fn->getNameStr () << "():\n";
 
   // Print Frame Information
@@ -260,8 +261,10 @@
     OS << "\n";
   }
   
-  for (const_iterator BB = begin(); BB != end(); ++BB)
-    BB->print(OS);
+  for (const_iterator BB = begin(); BB != end(); ++BB) {
+    prefix(OS, *BB);
+    BB->print(OS, prefix);
+  }
 
   OS << "\n# End machine code for " << Fn->getNameStr () << "().\n\n";
 }