From d452599f6f654398d9fa54bb32f1abf8dc70ca24 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Tue, 21 Nov 2006 22:50:24 +0000 Subject: [PATCH] Added the --disable-compression option which controls whether the generated bytecode uses compression. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31891 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/gccld/GenerateCode.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 2e81d38aac6..4053a89895e 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -40,6 +40,10 @@ namespace { cl::opt DisableOptimizations("disable-opt", cl::desc("Do not run any optimization passes")); + + cl::opt + 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); -- 2.34.1