Added the --disable-compression option which controls whether the

generated bytecode uses compression.

llvm-svn: 31891
This commit is contained in:
John Criswell 2006-11-21 22:50:24 +00:00
parent ec45a4c88c
commit dffef2d2f5
1 changed files with 5 additions and 1 deletions

View 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);