Add a new -no-output option, useful for -aa-eval tests.

llvm-svn: 5541
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index de56080..9d0837c 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -48,6 +48,9 @@
 PrintEachXForm("p", cl::desc("Print module after each transformation"));
 
 static cl::opt<bool>
+NoOutput("no-output", cl::desc("Do not write result bytecode file"), cl::Hidden);
+
+static cl::opt<bool>
 Quiet("q", cl::desc("Don't print 'program modified' message"));
 
 static cl::alias
@@ -128,7 +131,8 @@
   Passes.add(createVerifierPass());
 
   // Write bytecode out to disk or cout as the last step...
-  Passes.add(new WriteBytecodePass(Out, Out != &std::cout));
+  if (!NoOutput)
+    Passes.add(new WriteBytecodePass(Out, Out != &std::cout));
 
   // Now that we have all of the passes ready, run them.
   if (Passes.run(*M.get()) && !Quiet)