From: Nick Lewycky Date: Sun, 26 Oct 2008 23:59:36 +0000 (+0000) Subject: Remove -check-exit-code from bugpoint. This is subsumed by -append-exit-code. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=33b1c30b0be49d09e57630abd2535c9aaeaf8636;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58221 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/Bugpoint.html b/docs/Bugpoint.html index bdfd31379a9..eda22629eda 100644 --- a/docs/Bugpoint.html +++ b/docs/Bugpoint.html @@ -211,11 +211,6 @@ non-obvious ways. Here are some hints and tips:

you might try llvm-link -v on the same set of input files. If that also crashes, you may be experiencing a linker bug. -

  • If your program is supposed to crash, bugpoint 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 -check-exit-code=false - option. -
  • bugpoint is useful for proactively finding bugs in LLVM. Invoking bugpoint with the -find-bugs option will cause the list of specified optimizations to be randomized and applied to the diff --git a/docs/CommandGuide/bugpoint.pod b/docs/CommandGuide/bugpoint.pod index 12e32fbb2f5..d97f51fd23b 100644 --- a/docs/CommandGuide/bugpoint.pod +++ b/docs/CommandGuide/bugpoint.pod @@ -29,6 +29,11 @@ Load the dynamic shared object F into the test program whenever it is 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 Pass all arguments specified after -args to the test program whenever it runs. @@ -52,11 +57,6 @@ The "--" right after the B<--tool-args> option tells B to consider any options starting with C<-> to be part of the B<--tool-args> option, not as options to B 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 diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 96341116fcc..821b842689e 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/tools/bugpoint/ExecutionDriver.cpp @@ -54,11 +54,6 @@ namespace { clEnumValEnd), cl::init(AutoPick)); - cl::opt - CheckProgramExitCode("check-exit-code", - cl::desc("Assume nonzero exit code is failure (default on)"), - cl::init(true)); - cl::opt AppendProgramExitCode("append-exit-code", cl::desc("Append the exit code to the output so it gets diff'd too"), @@ -317,12 +312,6 @@ std::string BugDriver::executeProgramWithCBE(std::string OutputFile) { 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 @@ bool BugDriver::diffProgram(const std::string &BitcodeFile, 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),