Re-apply LiveInterval index dumping patch, with fixes suggested by Bill
[oota-llvm.git] / include / llvm / CodeGen / MachineFunction.h
index b306583a5ac00e1e5dd2898f35f71c1b6f7a4a84..57c946c789a9d1a85783af4060dd1e38a952606c 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "llvm/ADT/ilist.h"
 #include "llvm/Support/DebugLoc.h"
+#include "llvm/CodeGen/Dump.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/Support/Annotation.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Recycler.h"
 
@@ -66,7 +66,7 @@ struct MachineFunctionInfo {
   virtual ~MachineFunctionInfo() {}
 };
 
-class MachineFunction : private Annotation {
+class MachineFunction {
   Function *Fn;
   const TargetMachine &Target;
 
@@ -207,8 +207,12 @@ public:
   /// print - Print out the MachineFunction in a format suitable for debugging
   /// to the specified stream.
   ///
-  void print(std::ostream &OS) const;
-  void print(std::ostream *OS) const { if (OS) print(*OS); }
+  void print(std::ostream &OS, 
+             const PrefixPrinter &prefix = PrefixPrinter()) const;
+  void print(std::ostream *OS,
+             const PrefixPrinter &prefix = PrefixPrinter()) const {
+    if (OS) print(*OS, prefix); 
+  }
 
   /// viewCFG - This function is meant for use from the debugger.  You can just
   /// say 'call F->viewCFG()' and a ghostview window should pop up from the