diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-11-07 05:30:43 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-11-07 05:30:43 +0000 |
commit | 1f9e18e7c56ee355352f8439216b89599783dd2c (patch) | |
tree | 922ced4a7727aeb758820aa29e2f3bc3bb9141a8 | |
parent | fbb15f39b8bc65338eb4a3162c3991cabb63df7d (diff) | |
download | bcm5719-llvm-1f9e18e7c56ee355352f8439216b89599783dd2c.tar.gz bcm5719-llvm-1f9e18e7c56ee355352f8439216b89599783dd2c.zip |
* Provide option for specifying bytecode compression
* Enabled bytecode compression by default.
llvm-svn: 17563
-rw-r--r-- | llvm/include/llvm/Bytecode/WriteBytecodePass.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/include/llvm/Bytecode/WriteBytecodePass.h b/llvm/include/llvm/Bytecode/WriteBytecodePass.h index 5b6325d521e..8a061d298a7 100644 --- a/llvm/include/llvm/Bytecode/WriteBytecodePass.h +++ b/llvm/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; } }; |