blob: 539f66fea5457913cbd6c798fdcd8ee02376b9dd [file] [log] [blame]
Chris Lattner9d3787b2009-08-15 15:38:11 +00001
2=pod
3
4=head1 NAME
5
6FileCheck - Flexible pattern matching file verifier
7
8=head1 SYNOPSIS
9
10B<FileCheck> I<match-filename> [I<--check-prefix=XXX>] [I<--strict-whitespace>]
11
12=head1 DESCRIPTION
13
14B<FileCheck> reads two files (one from standard input, and one specified on the
15command line) and uses one to verify the other. This behavior is particularly
16useful for the testsuite, which wants to verify that the output of some tool
17(e.g. llc) contains the expected information (for example, a movsd from esp or
18whatever is interesting). This is similar to using grep, but it is optimized
19for matching multiple different inputs in one file in a specific order.
20
21The I<match-filename> file specifies the file that contains the patterns to
22match. The file to verify is always read from standard input.
23
Chris Lattner741042f2009-08-15 16:18:56 +000024The input and output of B<FileCheck> is beyond the scope of this short
Chris Lattner9d3787b2009-08-15 15:38:11 +000025introduction. Please see the I<TestingGuide> page in the LLVM documentation.
26
27=head1 OPTIONS
28
29=over
30
31=item B<--help>
32
33Print a summary of command line options.
34
35=item B<--check-prefix> I<prefix>
36
37FileCheck searches the contents of I<match-filename> for patterns to match. By
38default, these patterns are prefixed with "CHECK:". If you'd like to use a
39different prefix (e.g. because the same input file is checking multiple
40different tool or options), the B<--check-prefix> argument allows you to specify
41a specific prefix to match.
42
43=item B<--strict-whitespace>
44
45By default, FileCheck canonicalizes input horizontal whitespace (spaces and
46tabs) which causes it to ignore these differences (a space will match a tab).
47The --strict-whitespace argument disables this behavior.
48
49=item B<-version>
50
51Show the version number of this program.
52
53=back
54
55=head1 EXIT STATUS
56
57If B<FileCheck> verifies that the file matches the expected contents, it exits
58with 0. Otherwise, if not, or if an error occurs, it will exit with a non-zero
59value.
60
61=head1 AUTHORS
62
63Maintained by The LLVM Team (L<http://llvm.org>).
64
65=cut