From d31c9e5a46ee692daf2430b52626afcea1db18ab Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Fri, 27 Mar 2020 23:58:06 +0000 Subject: Change filecheck default to dump input on failure Having the input dumped on failure seems like a better default: I debugged FileCheck tests for a while without knowing about this option, which really helps to understand failures. Remove `-dump-input-on-failure` and the environment variable FILECHECK_DUMP_INPUT_ON_FAILURE which are now obsolete. Differential Revision: https://reviews.llvm.org/D81422 --- llvm/utils/FileCheck/FileCheck.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'llvm/utils/FileCheck/FileCheck.cpp') diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 3ee7c5a..8e41365 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -106,15 +106,6 @@ static cl::opt VerboseVerbose( cl::desc("Print information helpful in diagnosing internal FileCheck\n" "issues, or add it to the input dump if enabled. Implies\n" "-v.\n")); -static const char * DumpInputEnv = "FILECHECK_DUMP_INPUT_ON_FAILURE"; - -static cl::opt DumpInputOnFailure( - "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" - "This option is deprecated in favor of -dump-input=fail.\n")); // The order of DumpInputValue members affects their precedence, as documented // for -dump-input below. @@ -678,7 +669,7 @@ int main(int argc, char **argv) { SMLoc()); if (DumpInput == DumpInputDefault) - DumpInput = DumpInputOnFailure ? DumpInputFail : DumpInputNever; + DumpInput = DumpInputFail; std::vector Diags; int ExitCode = FC.checkInput(SM, InputFileText, -- cgit v1.1