[llvm-commits] CVS: llvm/include/llvm/Bytecode/WriteBytecodePass.h

Reid Spencer reid at x10sys.com
Sat Nov 6 21:30:53 PST 2004



Changes in directory llvm/include/llvm/Bytecode:

WriteBytecodePass.h updated: 1.11 -> 1.12
---
Log message:

* Provide option for specifying bytecode compression
* Enabled bytecode compression by default.


---
Diffs of the changes:  (+6 -5)

Index: llvm/include/llvm/Bytecode/WriteBytecodePass.h
diff -u llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.11 llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.12
--- llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.11	Sun Sep 19 23:42:36 2004
+++ llvm/include/llvm/Bytecode/WriteBytecodePass.h	Sat Nov  6 23:30:43 2004
@@ -24,18 +24,19 @@
 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;
   }
 };






More information about the llvm-commits mailing list