[FileCheck] Permit multiple -v or -vv
authorJoel E. Denny <jdenny.ornl@gmail.com>
Mon, 29 Jun 2020 22:35:22 +0000 (18:35 -0400)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Mon, 29 Jun 2020 22:35:22 +0000 (18:35 -0400)
commit782585a2144e2af019bd3e4dc48cab611545645b
treef5da4d5052de67624dd1ce990269a570d055603d
parent632438726429859b80a68721bf91daec2d8b7b2a
[FileCheck] Permit multiple -v or -vv

`FILECHECK_OPTS` was implemented so that a test runner, such as CI,
can specify FileCheck debugging options, such as `-v` and `-vv`.
However, if a test suite has a FileCheck call that already specifies
`-v` or `-vv`, then that call will fail if `FILECHECK_OPTS` also
specifies it.

For `-vv`, this problem already exists:

`clang/test/CodeGen/aarch64-v8.2a-fp16-intrinsics-constrained.c`

It's not yet clear if the `-vv` in that test was intentional, but this
usage shouldn't fail anyway.  It's already true that FileCheck permits
`-vv` and `-v` together even though `-vv` implies `-v`.

Compare D70784, which fixed the same problem for `-dump-input`.

Reviewed By: jhenderson, thopre

Differential Revision: https://reviews.llvm.org/D82601
llvm/test/FileCheck/verbose.txt
llvm/utils/FileCheck/FileCheck.cpp