diff options
Diffstat (limited to 'include/llvm/Bytecode/WriteBytecodePass.h')
-rw-r--r-- | include/llvm/Bytecode/WriteBytecodePass.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/llvm/Bytecode/WriteBytecodePass.h b/include/llvm/Bytecode/WriteBytecodePass.h index 5b6325d521..8a061d298a 100644 --- a/include/llvm/Bytecode/WriteBytecodePass.h +++ b/include/llvm/Bytecode/WriteBytecodePass.h @@ -24,18 +24,19 @@ namespace llvm { class WriteBytecodePass : public ModulePass { std::ostream *Out; // ostream to print on bool DeleteStream; + bool CompressFile; public: - WriteBytecodePass() : Out(&std::cout), DeleteStream(false) {} - WriteBytecodePass(std::ostream *o, bool DS = false) - : Out(o), DeleteStream(DS) { - } + WriteBytecodePass() + : Out(&std::cout), DeleteStream(false), CompressFile(true) {} + WriteBytecodePass(std::ostream *o, bool DS = false, bool CF = false ) + : Out(o), DeleteStream(DS), CompressFile(CF) {} inline ~WriteBytecodePass() { if (DeleteStream) delete Out; } bool runOnModule(Module &M) { - WriteBytecodeToFile(&M, *Out); + WriteBytecodeToFile(&M, *Out, CompressFile ); return false; } }; |