[PATCH] D21293: [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix options.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 07:34:58 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL272670: [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix… (authored by dsanders).

Changed prior to commit:
  http://reviews.llvm.org/D21293?vs=60683&id=60687#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21293

Files:
  llvm/trunk/test/FileCheck/check-multiple-prefixes-mixed.txt
  llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch-2.txt
  llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch.txt
  llvm/trunk/test/FileCheck/multiple-missing-prefixes.txt
  llvm/trunk/utils/FileCheck/FileCheck.cpp

Index: llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch.txt
===================================================================
--- llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch.txt
+++ llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch.txt
@@ -1,4 +1,6 @@
 ; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s
+; RUN: not FileCheck -input-file %s %s -check-prefixes=FOO,BAR 2>&1 | FileCheck %s
+; RUN: not FileCheck -input-file %s %s -check-prefixes=BAR,FOO 2>&1 | FileCheck %s
 
 BAR
 bar
Index: llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch-2.txt
===================================================================
--- llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch-2.txt
+++ llvm/trunk/test/FileCheck/check-multiple-prefixes-nomatch-2.txt
@@ -1,4 +1,6 @@
 ; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s
+; RUN: not FileCheck -input-file %s %s -check-prefixes=FOO,BAR 2>&1 | FileCheck %s
+; RUN: not FileCheck -input-file %s %s -check-prefixes=BAR,FOO 2>&1 | FileCheck %s
 
 fog
 bar
Index: llvm/trunk/test/FileCheck/multiple-missing-prefixes.txt
===================================================================
--- llvm/trunk/test/FileCheck/multiple-missing-prefixes.txt
+++ llvm/trunk/test/FileCheck/multiple-missing-prefixes.txt
@@ -1,5 +1,6 @@
 // RUN: FileCheck -check-prefix=ANOTHER-PREFIX -input-file %s %s
 // RUN: not FileCheck -check-prefix=PREFIX1 -check-prefix=PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK-NONEXISTENT-PREFIX -check-prefix=ALSO-NONEXISTENT %s
+// RUN: not FileCheck -check-prefixes=PREFIX1,PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefixes=CHECK-NONEXISTENT-PREFIX,ALSO-NONEXISTENT %s
 
 foobar
 ; ANOTHER-PREFIX: foobar
Index: llvm/trunk/test/FileCheck/check-multiple-prefixes-mixed.txt
===================================================================
--- llvm/trunk/test/FileCheck/check-multiple-prefixes-mixed.txt
+++ llvm/trunk/test/FileCheck/check-multiple-prefixes-mixed.txt
@@ -1,5 +1,7 @@
 // RUN: FileCheck -check-prefix=B -check-prefix=BOTH -input-file %s %s
 // RUN: FileCheck -check-prefix=A -check-prefix=BOTH -input-file %s %s
+// RUN: FileCheck -check-prefixes=B,BOTH -input-file %s %s
+// RUN: FileCheck -check-prefixes=A,BOTH -input-file %s %s
 
 ; A: {{a}}aaaaa
 ; B: {{b}}bbbb
Index: llvm/trunk/utils/FileCheck/FileCheck.cpp
===================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp
@@ -45,6 +45,11 @@
 static cl::list<std::string>
 CheckPrefixes("check-prefix",
               cl::desc("Prefix to use from check file (defaults to 'CHECK')"));
+static cl::alias CheckPrefixesAlias(
+    "check-prefixes", cl::aliasopt(CheckPrefixes), cl::CommaSeparated,
+    cl::NotHidden,
+    cl::desc(
+        "Alias for -check-prefix permitting multiple comma separated values"));
 
 static cl::opt<bool>
 NoCanonicalizeWhiteSpace("strict-whitespace",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21293.60687.patch
Type: text/x-patch
Size: 3103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160614/e68e1b0e/attachment.bin>


More information about the llvm-commits mailing list