Skip to content
Browse files

[llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-…


Enable dumping output only if FILECHECK_DUMP_INPUT_ON_FAILURE is set to
a non-empty value.  This is necessary to support disabling it via
POSIX-compliant env(1) that does not support '-u' argument,
and therefore fix regression caused by r366980.

Differential Revision:

llvm-svn: 367122
  • Loading branch information...
mgorny committed Jul 26, 2019
1 parent 91e8eac commit ffc722a3581775cf6c4bbedf1364434a932dc378
Showing with 2 additions and 1 deletion.
  1. +2 −1 llvm/utils/FileCheck/FileCheck.cpp
@@ -93,7 +93,8 @@ static cl::opt<bool> VerboseVerbose(
static const char * DumpInputEnv = "FILECHECK_DUMP_INPUT_ON_FAILURE";

static cl::opt<bool> DumpInputOnFailure(
"dump-input-on-failure", cl::init(std::getenv(DumpInputEnv)),
cl::init(std::getenv(DumpInputEnv) && *std::getenv(DumpInputEnv)),
cl::desc("Dump original input to stderr before failing.\n"
"The value can be also controlled using\n"
"FILECHECK_DUMP_INPUT_ON_FAILURE environment variable.\n"

0 comments on commit ffc722a

Please sign in to comment.
You can’t perform that action at this time.