summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-15 15:38:11 +0000
committerChris Lattner <sabre@nondot.org>2009-08-15 15:38:11 +0000
commit9d3787b73c312b78a0dade24018ec0d28bca4e16 (patch)
treeb6a44e7f2d069dae818d5c8e07b9962eeb7ead80 /docs
parent5f0b7488ef321a9ef7f58c877d8c3afce09e6678 (diff)
downloadllvm-9d3787b73c312b78a0dade24018ec0d28bca4e16.tar.gz
llvm-9d3787b73c312b78a0dade24018ec0d28bca4e16.tar.bz2
llvm-9d3787b73c312b78a0dade24018ec0d28bca4e16.tar.xz
add a simple FileCheck man page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/CommandGuide/FileCheck.pod65
-rw-r--r--docs/CommandGuide/index.html2
2 files changed, 67 insertions, 0 deletions
diff --git a/docs/CommandGuide/FileCheck.pod b/docs/CommandGuide/FileCheck.pod
new file mode 100644
index 0000000000..2f9f007133
--- /dev/null
+++ b/docs/CommandGuide/FileCheck.pod
@@ -0,0 +1,65 @@
+
+=pod
+
+=head1 NAME
+
+FileCheck - Flexible pattern matching file verifier
+
+=head1 SYNOPSIS
+
+B<FileCheck> I<match-filename> [I<--check-prefix=XXX>] [I<--strict-whitespace>]
+
+=head1 DESCRIPTION
+
+B<FileCheck> reads two files (one from standard input, and one specified on the
+command line) and uses one to verify the other. This behavior is particularly
+useful for the testsuite, which wants to verify that the output of some tool
+(e.g. llc) contains the expected information (for example, a movsd from esp or
+whatever is interesting). This is similar to using grep, but it is optimized
+for matching multiple different inputs in one file in a specific order.
+
+The I<match-filename> file specifies the file that contains the patterns to
+match. The file to verify is always read from standard input.
+
+The input and output of B<tblgen> is beyond the scope of this short
+introduction. Please see the I<TestingGuide> page in the LLVM documentation.
+
+=head1 OPTIONS
+
+=over
+
+=item B<--help>
+
+Print a summary of command line options.
+
+=item B<--check-prefix> I<prefix>
+
+FileCheck searches the contents of I<match-filename> for patterns to match. By
+default, these patterns are prefixed with "CHECK:". If you'd like to use a
+different prefix (e.g. because the same input file is checking multiple
+different tool or options), the B<--check-prefix> argument allows you to specify
+a specific prefix to match.
+
+=item B<--strict-whitespace>
+
+By default, FileCheck canonicalizes input horizontal whitespace (spaces and
+tabs) which causes it to ignore these differences (a space will match a tab).
+The --strict-whitespace argument disables this behavior.
+
+=item B<-version>
+
+Show the version number of this program.
+
+=back
+
+=head1 EXIT STATUS
+
+If B<FileCheck> verifies that the file matches the expected contents, it exits
+with 0. Otherwise, if not, or if an error occurs, it will exit with a non-zero
+value.
+
+=head1 AUTHORS
+
+Maintained by The LLVM Team (L<http://llvm.org>).
+
+=cut
diff --git a/docs/CommandGuide/index.html b/docs/CommandGuide/index.html
index 75933e8d74..ca233a11f0 100644
--- a/docs/CommandGuide/index.html
+++ b/docs/CommandGuide/index.html
@@ -128,6 +128,8 @@ options) arguments to the tool you are interested in.</p>
<div class="doc_text">
<ul>
+<li><a href="/cmds/FileCheck.html"><b>FileCheck</b></a> -
+ Flexible file verifier used extensively by the testing harness</li>
<li><a href="/cmds/tblgen.html"><b>tblgen</b></a> -
target description reader and generator</li>