summaryrefslogtreecommitdiff
path: root/tools/opt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-28 17:31:55 +0000
committerChris Lattner <sabre@nondot.org>2006-08-28 17:31:55 +0000
commit5e9b177cb576e9222f2d0519c3958101656ec86b (patch)
treee5d11995d769f63a2d349e3005accf4a524e5b7e /tools/opt
parent20c71001a4dc91124950bbf302bd9ca5be9aa7f7 (diff)
downloadllvm-5e9b177cb576e9222f2d0519c3958101656ec86b.tar.gz
llvm-5e9b177cb576e9222f2d0519c3958101656ec86b.tar.bz2
llvm-5e9b177cb576e9222f2d0519c3958101656ec86b.tar.xz
Add a --disable-compression option like llvm-link/llvm-as etc have
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/opt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 5c61549d75..0602289aa6 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -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());