diff options
5 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/FileCheck/check-multiple-prefixes-mixed.txt b/llvm/test/FileCheck/check-multiple-prefixes-mixed.txt index cd3b70a425e..1e6bcbf3e72 100644 --- a/llvm/test/FileCheck/check-multiple-prefixes-mixed.txt +++ b/llvm/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 diff --git a/llvm/test/FileCheck/check-multiple-prefixes-nomatch-2.txt b/llvm/test/FileCheck/check-multiple-prefixes-nomatch-2.txt index a1dc3d87b01..605547167e9 100644 --- a/llvm/test/FileCheck/check-multiple-prefixes-nomatch-2.txt +++ b/llvm/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 diff --git a/llvm/test/FileCheck/check-multiple-prefixes-nomatch.txt b/llvm/test/FileCheck/check-multiple-prefixes-nomatch.txt index 9d3835985f3..b1a41321c08 100644 --- a/llvm/test/FileCheck/check-multiple-prefixes-nomatch.txt +++ b/llvm/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 diff --git a/llvm/test/FileCheck/multiple-missing-prefixes.txt b/llvm/test/FileCheck/multiple-missing-prefixes.txt index cb557d9f260..0acb8f0b3ed 100644 --- a/llvm/test/FileCheck/multiple-missing-prefixes.txt +++ b/llvm/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 diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index b895d0744f7..6c9b62d5b24 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -45,6 +45,11 @@ InputFilename("input-file", cl::desc("File to check (defaults to stdin)"), 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", |

