From 4dbe59b5ba77c78160fbe437d74a5cb38e67f3ef Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 12 Feb 2003 18:43:33 +0000 Subject: Add a new -no-output option, useful for -aa-eval tests. llvm-svn: 5541 --- llvm/tools/opt/opt.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/tools/opt/opt.cpp') diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index de56080c2c1..9d0837c29d7 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -47,6 +47,9 @@ Force("f", cl::desc("Overwrite output files")); static cl::opt PrintEachXForm("p", cl::desc("Print module after each transformation")); +static cl::opt +NoOutput("no-output", cl::desc("Do not write result bytecode file"), cl::Hidden); + static cl::opt Quiet("q", cl::desc("Don't print 'program modified' message")); @@ -128,7 +131,8 @@ int main(int argc, char **argv) { 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) -- cgit v1.2.3