llvm.org GIT mirror llvm / ded4398
[FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix options. Summary: This new alias takes a comma separated list of prefixes which allows '--check-prefix=A --check-prefix=B --check-prefix=C' to be written as '--check-prefixes=A,B,C'. Reviewers: probinson Subscribers: probinson, llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D21293 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272670 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Sanders 3 years ago
5 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 // RUN: FileCheck -check-prefix=B -check-prefix=BOTH -input-file %s %s
11 // RUN: FileCheck -check-prefix=A -check-prefix=BOTH -input-file %s %s
2 // RUN: FileCheck -check-prefixes=B,BOTH -input-file %s %s
3 // RUN: FileCheck -check-prefixes=A,BOTH -input-file %s %s
24
35 ; A: {{a}}aaaaa
46 ; B: {{b}}bbbb
0 ; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s
1 ; RUN: not FileCheck -input-file %s %s -check-prefixes=FOO,BAR 2>&1 | FileCheck %s
2 ; RUN: not FileCheck -input-file %s %s -check-prefixes=BAR,FOO 2>&1 | FileCheck %s
13
24 fog
35 bar
0 ; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s
1 ; RUN: not FileCheck -input-file %s %s -check-prefixes=FOO,BAR 2>&1 | FileCheck %s
2 ; RUN: not FileCheck -input-file %s %s -check-prefixes=BAR,FOO 2>&1 | FileCheck %s
13
24 BAR
35 bar
0 // RUN: FileCheck -check-prefix=ANOTHER-PREFIX -input-file %s %s
11 // 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
2 // RUN: not FileCheck -check-prefixes=PREFIX1,PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefixes=CHECK-NONEXISTENT-PREFIX,ALSO-NONEXISTENT %s
23
34 foobar
45 ; ANOTHER-PREFIX: foobar
4444 static cl::list
4545 CheckPrefixes("check-prefix",
4646 cl::desc("Prefix to use from check file (defaults to 'CHECK')"));
47 static cl::alias CheckPrefixesAlias(
48 "check-prefixes", cl::aliasopt(CheckPrefixes), cl::CommaSeparated,
49 cl::NotHidden,
50 cl::desc(
51 "Alias for -check-prefix permitting multiple comma separated values"));
4752
4853 static cl::opt
4954 NoCanonicalizeWhiteSpace("strict-whitespace",