From 6dda6ff0e094b667311dbd7a46d4e36aa787e033 Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Fri, 10 Jul 2020 17:13:25 -0400 Subject: [FileCheck] Fix up -dump-input* docs In FileCheck.rst, add `-dump-input-context` and `-dump-input-filter`, and fix some `-dump-input` documentation. In `FileCheck -help`, `cl::value_desc("kind")` is being ignored for `-dump-input-filter`, so just drop it. Extend `-dump-input=help` to mention FILECHECK_OPTS. --- llvm/utils/FileCheck/FileCheck.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'llvm/utils/FileCheck/FileCheck.cpp') diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 8bf1dd2e9b49..fa79c5e89489 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -140,12 +140,11 @@ enum DumpInputFilterValue { static cl::list DumpInputFilters( "dump-input-filter", cl::desc("In the dump requested by -dump-input, print only input lines of\n" - "kind plus any context specified by -dump-input-context.\n" - "When there are multiple occurrences of this option, the \n" + "kind plus any context specified by -dump-input-context.\n" + "When there are multiple occurrences of this option, the \n" "that appears earliest in the list below has precedence. The\n" "default is 'error' when -dump-input=fail, and it's 'all' when\n" "-dump-input=always.\n"), - cl::value_desc("kind"), cl::values(clEnumValN(DumpInputFilterAll, "all", "All input lines"), clEnumValN(DumpInputFilterAnnotationFull, "annotation-full", "Input lines with annotations"), @@ -226,14 +225,21 @@ static void DumpInputAnnotationHelp(raw_ostream &OS) { << "explain the input dump printed by FileCheck.\n" << "\n" << "Related command-line options:\n" + << "\n" << " - -dump-input= enables or disables the input dump\n" - << " - -dump-input-filter= filters the input lines\n" + << " - -dump-input-filter= filters the input lines\n" << " - -dump-input-context= adjusts the context of filtered lines\n" << " - -v and -vv add more annotations\n" << " - -color forces colors to be enabled both in the dump and below\n" << " - -help documents the above options in more detail\n" << "\n" - << "Input dump annotation format:\n"; + << "These options can also be set via FILECHECK_OPTS. For example, for\n" + << "maximum debugging output on failures:\n" + << "\n" + << " $ FILECHECK_OPTS='-dump-input-filter=all -vv -color' ninja check\n" + << "\n" + << "Input dump annotation format:\n" + << "\n"; // Labels for input lines. OS << " - "; -- cgit v1.2.3