Expose passinfo from BreakCriticalEdges pass so that it may be "Required" by
[oota-llvm.git] / include / llvm / Bytecode / WriteBytecodePass.h
index bd9d42369ecb7baaa91f015e1d64b906edcba889..1141a423464e9df625f93c7a86352356f0245dbe 100644 (file)
 
 #include "llvm/Pass.h"
 #include "llvm/Bytecode/Writer.h"
+#include <iostream>
 
 class WriteBytecodePass : public Pass {
-  ostream *Out;           // ostream to print on
+  std::ostream *Out;           // ostream to print on
   bool DeleteStream;
 public:
-  inline WriteBytecodePass(ostream *o = &cout, bool DS = false)
+  WriteBytecodePass() : Out(&std::cout), DeleteStream(false) {}
+  WriteBytecodePass(std::ostream *o, bool DS = false) 
     : Out(o), DeleteStream(DS) {
   }
 
@@ -23,8 +25,8 @@ public:
     if (DeleteStream) delete Out;
   }
   
-  bool run(Module *M) {
-    WriteBytecodeToFile(M, *Out);    
+  bool run(Module &M) {
+    WriteBytecodeToFile(&M, *Out);    
     return false;
   }
 };