mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty
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: https://reviews.llvm.org/D65334 llvm-svn: 367122
This commit is contained in:
parent
a0596d1089
commit
55dcc42252
@ -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)),
|
||||
"dump-input-on-failure",
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user