Skip to content

Commit efca37f

Browse files
authored
llvm-reduce: Change exit code for uninteresting inputs (#134021)
This makes it easier to reduce llvm-reduce with llvm-reduce to filter cases where the input reduced too much. Not sure if it's possible to test the exit code in lit.
1 parent ddc48fe commit efca37f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

llvm/docs/CommandGuide/llvm-reduce.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ GENERIC OPTIONS
108108
EXIT STATUS
109109
------------
110110

111-
:program:`llvm-reduce` returns 0 under normal operation. It returns a non-zero
112-
exit code if there were any errors.
111+
:program:`llvm-reduce` returns 0 under normal operation. It returns a
112+
non-zero exit code if there were any errors. Returns 2 if the
113+
interestingness test reported the initial input was not interesting.
113114

114115
EXAMPLE
115116
-------

llvm/tools/llvm-reduce/llvm-reduce.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ int main(int Argc, char **Argv) {
203203
// interestingness checks.
204204
if (!Tester.getProgram().isReduced(Tester)) {
205205
errs() << "\nInput isn't interesting! Verify interesting-ness test\n";
206-
return 1;
206+
return 2;
207207
}
208208

209209
// Try to reduce code

0 commit comments

Comments
 (0)