Added the --disable-compression option which controls whether the
[oota-llvm.git] / tools / gccld / GenerateCode.cpp
index 2e81d38aac61f6a781b139a4e974b03b07baddd7..4053a89895ef33ca861dcff92ed874e61ed52141 100644 (file)
@@ -40,6 +40,10 @@ namespace {
   cl::opt<bool>
   DisableOptimizations("disable-opt",
                        cl::desc("Do not run any optimization passes"));
+
+  cl::opt<bool>
+  NoCompress("disable-compression", cl::init(false),
+             cl::desc("Don't compress the generated bytecode"));
 }
 
 /// CopyEnv - This function takes an array of environment variables and makes a
@@ -280,7 +284,7 @@ int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize,
   Passes.add(createVerifierPass());
 
   // Add the pass that writes bytecode to the output file...
-  addPass(Passes, new WriteBytecodePass(Out));
+  addPass(Passes, new WriteBytecodePass(Out, false, !NoCompress));
 
   // Run our queue of passes all at once now, efficiently.
   Passes.run(*M);