summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-07 05:30:43 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-07 05:30:43 +0000
commit8ad8a5219c396fcd143b5c3363e60952e5647df7 (patch)
treee75b54a20fcd4107780a68069f81bec573c9db5f
parent12d632c8d0373ff469d1c56643796b817c68cba6 (diff)
downloadllvm-8ad8a5219c396fcd143b5c3363e60952e5647df7.tar.gz
llvm-8ad8a5219c396fcd143b5c3363e60952e5647df7.tar.bz2
llvm-8ad8a5219c396fcd143b5c3363e60952e5647df7.tar.xz
* 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
-rw-r--r--include/llvm/Bytecode/WriteBytecodePass.h11
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;
}
};