#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) {
}
if (DeleteStream) delete Out;
}
- bool run(Module *M) {
- WriteBytecodeToFile(M, *Out);
+ bool run(Module &M) {
+ WriteBytecodeToFile(&M, *Out);
return false;
}
};