[PATCH] D65334: [llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 08:39:16 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL367122: [llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty (authored by mgorny, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D65334?vs=211934&id=211948#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65334/new/

https://reviews.llvm.org/D65334

Files:
  llvm/trunk/utils/FileCheck/FileCheck.cpp


Index: llvm/trunk/utils/FileCheck/FileCheck.cpp
===================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp
@@ -93,7 +93,8 @@
 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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65334.211948.patch
Type: text/x-patch
Size: 701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190726/9533c977/attachment.bin>


More information about the llvm-commits mailing list