[PATCH] D82601: [FileCheck] Permit multiple -v or -vv

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 07:37:24 PDT 2020


jdenny updated this revision to Diff 273725.
jdenny added a comment.

Changed `RUN` style to match what I now recall has been recommended in the past: `|` at end not beginning of line.

Extracted style changes of existing `RUN` lines to a parent patch, as requested.


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

https://reviews.llvm.org/D82601

Files:
  llvm/test/FileCheck/verbose.txt
  llvm/utils/FileCheck/FileCheck.cpp


Index: llvm/utils/FileCheck/FileCheck.cpp
===================================================================
--- llvm/utils/FileCheck/FileCheck.cpp
+++ llvm/utils/FileCheck/FileCheck.cpp
@@ -97,12 +97,12 @@
              "non-overlapping CHECK-DAG implementation.\n"));
 
 static cl::opt<bool> Verbose(
-    "v", cl::init(false),
+    "v", cl::init(false), cl::ZeroOrMore,
     cl::desc("Print directive pattern matches, or add them to the input dump\n"
              "if enabled.\n"));
 
 static cl::opt<bool> VerboseVerbose(
-    "vv", cl::init(false),
+    "vv", cl::init(false), cl::ZeroOrMore,
     cl::desc("Print information helpful in diagnosing internal FileCheck\n"
              "issues, or add it to the input dump if enabled.  Implies\n"
              "-v.\n"));
Index: llvm/test/FileCheck/verbose.txt
===================================================================
--- llvm/test/FileCheck/verbose.txt
+++ llvm/test/FileCheck/verbose.txt
@@ -10,6 +10,22 @@
 ; RUN: FileCheck -dump-input=never -vv -input-file %s %s 2>&1 | \
 ; RUN:   FileCheck --strict-whitespace -check-prefixes V,VV %s
 
+; RUN: %ProtectFileCheckOutput \
+; RUN: FileCheck -dump-input=never -v -v -input-file %s %s 2>&1 | \
+; RUN:   FileCheck --strict-whitespace -check-prefix V %s
+
+; RUN: %ProtectFileCheckOutput \
+; RUN: FileCheck -dump-input=never -vv -vv -input-file %s %s 2>&1 | \
+; RUN:   FileCheck --strict-whitespace -check-prefixes V,VV %s
+
+; RUN: %ProtectFileCheckOutput \
+; RUN: FileCheck -dump-input=never -v -vv -input-file %s %s 2>&1 | \
+; RUN:   FileCheck --strict-whitespace -check-prefixes V,VV %s
+
+; RUN: %ProtectFileCheckOutput \
+; RUN: FileCheck -dump-input=never -vv -v -input-file %s %s 2>&1 | \
+; RUN:   FileCheck --strict-whitespace -check-prefixes V,VV %s
+
 ; END.
 
 foo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82601.273725.patch
Type: text/x-patch
Size: 1798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200626/73553b54/attachment-0001.bin>


More information about the llvm-commits mailing list