filecheck
LLVM pattern-matching testing tool
TLDR
Run FileCheck on file
SYNOPSIS
FileCheck [options] check-file
DESCRIPTION
FileCheck is an LLVM testing tool that verifies text output matches specified patterns. It reads a file containing CHECK directives and verifies they match against input, commonly compiler output.
The tool supports various check types: CHECK for sequential matching, CHECK-NEXT for consecutive lines, CHECK-NOT for absence, and CHECK-SAME for same-line matches.
FileCheck is essential for LLVM and compiler testing, validating generated code matches expected patterns.
PARAMETERS
CHECK-FILE
File containing CHECK directives.--input-file FILE
Input file to verify.-v, --verbose
Print good matches.--match-full-lines
Require full line matches.--strict-whitespace
Strict whitespace matching.--check-prefix PREFIX
Use custom check prefix.--help
Display help information.
CAVEATS
Pattern syntax differs from standard regex. Whitespace handling can be tricky. Primarily designed for LLVM testing.
HISTORY
FileCheck was developed as part of LLVM's testing infrastructure. It provides a flexible pattern-matching system for validating compiler output in regression tests.
