summaryrefslogtreecommitdiffstats
path: root/llvm/utils/FileCheck
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2019-01-22 21:41:42 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2019-01-22 21:41:42 +0000
commit352695c336112585b10e92d280652c0084ba9650 (patch)
tree2c2f0bfcbf5dff588dc1478857035a9105abbe2e /llvm/utils/FileCheck
parent52133812f60916fb9632310735d522217824ac6f (diff)
downloadbcm5719-llvm-352695c336112585b10e92d280652c0084ba9650.tar.gz
bcm5719-llvm-352695c336112585b10e92d280652c0084ba9650.zip
[FileCheck] Suppress old -v/-vv diags if dumping input
The old diagnostic form of the trace produced by -v and -vv looks like: ``` check1:1:8: remark: CHECK: expected string found in input CHECK: abc ^ <stdin>:1:3: note: found here ; abc def ^~~ ``` When dumping annotated input is requested (via -dump-input), I find that this old trace is not useful and is sometimes harmful: 1. The old trace is mostly redundant because the same basic information also appears in the input dump's annotations. 2. The old trace buries any error diagnostic between it and the input dump, but I find it useful to see any error diagnostic up front. 3. FILECHECK_OPTS=-dump-input=fail requests annotated input dumps only for failed FileCheck calls. However, I have to also add -v or -vv to get a full set of annotations, and that can produce massive output from all FileCheck calls in all tests. That's a real problem when I run this in the IDE I use, which grinds to a halt as it tries to capture all that output. When -dump-input=fail|always, this patch suppresses the old trace from -v or -vv. Error diagnostics still print as usual. If you want the old trace, perhaps to see variable expansions, you can set -dump-input=none (the default). Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D55825 llvm-svn: 351881
Diffstat (limited to 'llvm/utils/FileCheck')
-rw-r--r--llvm/utils/FileCheck/FileCheck.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp
index 757207bac04..0d5f38acfa7 100644
--- a/llvm/utils/FileCheck/FileCheck.cpp
+++ b/llvm/utils/FileCheck/FileCheck.cpp
@@ -79,13 +79,16 @@ static cl::opt<bool> AllowDeprecatedDagOverlap(
"provided for convenience as old tests are migrated to the new\n"
"non-overlapping CHECK-DAG implementation.\n"));
-static cl::opt<bool> Verbose("v", cl::init(false),
- cl::desc("Print directive pattern matches.\n"));
+static cl::opt<bool> Verbose(
+ "v", cl::init(false),
+ cl::desc("Print directive pattern matches, or add them to the input dump\n"
+ "if enabled.\n"));
static cl::opt<bool> VerboseVerbose(
"vv", cl::init(false),
cl::desc("Print information helpful in diagnosing internal FileCheck\n"
- "issues. Implies -v.\n"));
+ "issues, or add it to the input dump if enabled. Implies\n"
+ "-v.\n"));
static const char * DumpInputEnv = "FILECHECK_DUMP_INPUT_ON_FAILURE";
static cl::opt<bool> DumpInputOnFailure(
OpenPOWER on IntegriCloud