[PATCH] D81422: Change filecheck default to dump input on failure

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 12:44:40 PDT 2020


mehdi_amini created this revision.
Herald added subscribers: llvm-commits, thopre.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81422

Files:
  llvm/utils/FileCheck/FileCheck.cpp


Index: llvm/utils/FileCheck/FileCheck.cpp
===================================================================
--- llvm/utils/FileCheck/FileCheck.cpp
+++ llvm/utils/FileCheck/FileCheck.cpp
@@ -106,15 +106,6 @@
     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<bool> 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 @@
                         SMLoc());
 
   if (DumpInput == DumpInputDefault)
-    DumpInput = DumpInputOnFailure ? DumpInputFail : DumpInputNever;
+    DumpInput = DumpInputFail;
 
   std::vector<FileCheckDiag> Diags;
   int ExitCode = FC.checkInput(SM, InputFileText,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81422.269321.patch
Type: text/x-patch
Size: 1269 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200608/5c18be68/attachment.bin>


More information about the llvm-commits mailing list