[llvm-commits] CVS: llvm/tools/opt/opt.cpp

LLVM llvm at cs.uiuc.edu
Thu May 27 11:32:04 PDT 2004


Changes in directory llvm/tools/opt:

opt.cpp updated: 1.91 -> 1.92

---
Log message:

Re-introduce the -q option and make opt always return 0, even if the 
optimization pasess fail. This is necessary to avoid breaking feature 
tests in the tests suite that depend on this behavior. *sigh*


---
Diffs of the changes:  (+7 -3)

Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.91 llvm/tools/opt/opt.cpp:1.92
--- llvm/tools/opt/opt.cpp:1.91	Thu May 27 03:26:22 2004
+++ llvm/tools/opt/opt.cpp	Thu May 27 11:28:54 2004
@@ -62,6 +62,9 @@
 static cl::opt<bool>
 Quiet("q", cl::desc("Don't print 'program modified' message"));
 
+static cl::alias
+QuietA("quiet", cl::desc("Alias for -q"), cl::aliasopt(Quiet));
+
 
 //===----------------------------------------------------------------------===//
 // main for opt
@@ -114,7 +117,8 @@
   // If the output is set to be emitted to standard out, and standard out is a
   // console, print out a warning message and refuse to do it.  We don't impress
   // anyone by spewing tons of binary goo to a terminal.
-  if (Out == &std::cout && isStandardOutAConsole() && !Force && !NoOutput) {
+  if (Out == &std::cout && isStandardOutAConsole() && !Force && !NoOutput 
+      && !Quiet) {
     std::cerr << "WARNING: It looks like you're attempting to print out a "
               << "bytecode file.  I'm\ngoing to pretend you didn't ask me to do"
               << " this (for your own good).  If you\nREALLY want to taste LLVM"
@@ -161,8 +165,8 @@
     Passes.add(new WriteBytecodePass(Out, Out != &std::cout));
 
   // Now that we have all of the passes ready, run them.
-  if (Passes.run(*M.get()))
+  if (Passes.run(*M.get()) )
     return 0;
 
-  return 1;
+  return 0;
 }





More information about the llvm-commits mailing list