FileCheck

Flexible pattern matching file verifier. It is typically used from LLVM regression tests and forms a part of a lit test. More information: https://llvm.org/docs/CommandGuide/FileCheck.html.

FileCheck --input-file={{path/to/input_file}} {{path/to/check_file}}

echo "{{some_text}}" | FileCheck {{path/to/check_file}}

echo "{{some_text}}" | FileCheck --check-prefix={{prefix}} {{path/to/check_file}}

echo "{{some_text}}" | FileCheck -v {{path/to/check_file}}

llvm-as {{path/to/llvm_code.ll}} | FileCheck {{path/to/check_file}}