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 | 8ad8a5219c396fcd143b5c3363e60952e5647df7 (patch) | |
tree | e75b54a20fcd4107780a68069f81bec573c9db5f /include/llvm | |
parent | 12d632c8d0373ff469d1c56643796b817c68cba6 (diff) | |
download | external_llvm-8ad8a5219c396fcd143b5c3363e60952e5647df7.zip external_llvm-8ad8a5219c396fcd143b5c3363e60952e5647df7.tar.gz external_llvm-8ad8a5219c396fcd143b5c3363e60952e5647df7.tar.bz2 |
* Provide option for specifying bytecode compression
* Enabled bytecode compression by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-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 5b6325d..8a061d2 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; } }; |