Add a --disable-compression option like llvm-link/llvm-as etc have
authorChris Lattner <sabre@nondot.org>
Mon, 28 Aug 2006 17:31:55 +0000 (17:31 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 28 Aug 2006 17:31:55 +0000 (17:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29941 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 5c61549d75eb57c9b3bddcaec6d402fe870e8047..0602289aa679774c76b424fc34aaae5f96f5cea0 100644 (file)
@@ -38,6 +38,8 @@ using namespace llvm;
 static cl::list<const PassInfo*, bool, PassNameParser>
 PassList(cl::desc("Optimizations available:"));
 
+static cl::opt<bool> NoCompress("disable-compression", cl::init(false),
+       cl::desc("Don't compress the generated bytecode"));
 
 // Other command line options...
 //
@@ -250,7 +252,7 @@ int main(int argc, char **argv) {
 
     // Write bytecode out to disk or cout as the last step...
     if (!NoOutput && !AnalyzeOnly)
-      Passes.add(new WriteBytecodePass(Out, Out != &std::cout));
+      Passes.add(new WriteBytecodePass(Out, Out != &std::cout, !NoCompress));
 
     // Now that we have all of the passes ready, run them.
     Passes.run(*M.get());