* Provide option for specifying bytecode compression
authorReid Spencer <rspencer@reidspencer.com>
Sun, 7 Nov 2004 05:30:43 +0000 (05:30 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 7 Nov 2004 05:30:43 +0000 (05:30 +0000)
* Enabled bytecode compression by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17563 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bytecode/WriteBytecodePass.h

index 5b6325d521eaecb0d27672c9d8a1ad58b8d67306..8a061d298a7646e7b4a5f861842a92bdab82eccc 100644 (file)
@@ -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;
   }
 };