[llvm-commits] [llvm] r58221 - in /llvm/trunk: docs/Bugpoint.html docs/CommandGuide/bugpoint.pod tools/bugpoint/ExecutionDriver.cpp

Nick Lewycky nicholas at mxc.ca
Sun Oct 26 16:59:36 PDT 2008


Author: nicholas
Date: Sun Oct 26 18:59:36 2008
New Revision: 58221

URL: http://llvm.org/viewvc/llvm-project?rev=58221&view=rev
Log:
Remove -check-exit-code from bugpoint. This is subsumed by -append-exit-code.
Note that -check-exit-code was on by default while -append-exit-code is not.

Modified:
    llvm/trunk/docs/Bugpoint.html
    llvm/trunk/docs/CommandGuide/bugpoint.pod
    llvm/trunk/tools/bugpoint/ExecutionDriver.cpp

Modified: llvm/trunk/docs/Bugpoint.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Bugpoint.html?rev=58221&r1=58220&r2=58221&view=diff

==============================================================================
--- llvm/trunk/docs/Bugpoint.html (original)
+++ llvm/trunk/docs/Bugpoint.html Sun Oct 26 18:59:36 2008
@@ -211,11 +211,6 @@
     you might try <tt>llvm-link -v</tt> on the same set of input files. If
     that also crashes, you may be experiencing a linker bug.
 
-<li>If your program is <b>supposed</b> to crash, <tt>bugpoint</tt> will be
-    confused. One way to deal with this is to cause bugpoint to ignore the exit
-    code from your program, by giving it the <tt>-check-exit-code=false</tt>
-    option.
-
 <li><tt>bugpoint</tt> is useful for proactively finding bugs in LLVM. 
     Invoking <tt>bugpoint</tt> with the <tt>-find-bugs</tt> option will cause
     the list of specified optimizations to be randomized and applied to the 

Modified: llvm/trunk/docs/CommandGuide/bugpoint.pod
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/bugpoint.pod?rev=58221&r1=58220&r2=58221&view=diff

==============================================================================
--- llvm/trunk/docs/CommandGuide/bugpoint.pod (original)
+++ llvm/trunk/docs/CommandGuide/bugpoint.pod Sun Oct 26 18:59:36 2008
@@ -29,6 +29,11 @@
 run.  This is useful if you are debugging programs which depend on non-LLVM
 libraries (such as the X or curses libraries) to run.
 
+=item B<--append-exit-code>=I<{true,false}>
+
+Append the test programs exit code to the output file so that a change in exit
+code is considered a test failure. Defaults to false.
+
 =item B<--args> I<program args>
 
 Pass all arguments specified after -args to the test program whenever it runs.
@@ -52,11 +57,6 @@
 options starting with C<-> to be part of the B<--tool-args> option, not as
 options to B<bugpoint> itself. (See B<--args>, above.)
 
-=item B<--check-exit-code>=I<{true,false}>
-
-Assume a non-zero exit code or core dump from the test program is a failure.
-Defaults to true.
-
 =item B<--disable-{dce,simplifycfg}>
 
 Do not run the specified passes to clean up and reduce the size of the test

Modified: llvm/trunk/tools/bugpoint/ExecutionDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExecutionDriver.cpp?rev=58221&r1=58220&r2=58221&view=diff

==============================================================================
--- llvm/trunk/tools/bugpoint/ExecutionDriver.cpp (original)
+++ llvm/trunk/tools/bugpoint/ExecutionDriver.cpp Sun Oct 26 18:59:36 2008
@@ -55,11 +55,6 @@
                  cl::init(AutoPick));
 
   cl::opt<bool>
-  CheckProgramExitCode("check-exit-code",
-                   cl::desc("Assume nonzero exit code is failure (default on)"),
-                       cl::init(true));
-
-  cl::opt<bool>
   AppendProgramExitCode("append-exit-code",
       cl::desc("Append the exit code to the output so it gets diff'd too"),
       cl::init(false));
@@ -317,12 +312,6 @@
   bool ProgramExitedNonzero;
   std::string outFN = executeProgram(OutputFile, "", "", cbe,
                                      &ProgramExitedNonzero);
-  if (ProgramExitedNonzero) {
-    std::cerr
-      << "Warning: While generating reference output, program exited with\n"
-      << "non-zero exit code. This will NOT be treated as a failure.\n";
-    CheckProgramExitCode = false;
-  }
   return outFN;
 }
 
@@ -384,14 +373,6 @@
   sys::Path Output(executeProgram("", BitcodeFile, SharedObject, 0,
                                       &ProgramExitedNonzero));
 
-  // If we're checking the program exit code, assume anything nonzero is bad.
-  if (CheckProgramExitCode && ProgramExitedNonzero) {
-    Output.eraseFromDisk();
-    if (RemoveBitcode)
-      sys::Path(BitcodeFile).eraseFromDisk();
-    return true;
-  }
-
   std::string Error;
   bool FilesDifferent = false;
   if (int Diff = DiffFilesWithTolerance(sys::Path(ReferenceOutputFile),





More information about the llvm-commits mailing list