Add a version of the bytecode writer pass that has a default ctor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-07-23 19:56:03 +00:00
parent 3c19b92389
commit 28fe8ce18f

View File

@ -16,12 +16,11 @@ class WriteBytecodePass : public Pass {
std::ostream *Out; // ostream to print on
bool DeleteStream;
public:
inline WriteBytecodePass(std::ostream *o = &std::cout, bool DS = false)
WriteBytecodePass() : Out(&std::cout), DeleteStream(false) {}
WriteBytecodePass(std::ostream *o, bool DS = false)
: Out(o), DeleteStream(DS) {
}
const char *getPassName() const { return "Bytecode Writer"; }
inline ~WriteBytecodePass() {
if (DeleteStream) delete Out;
}