[PATCH] D90281: [FileCheck] Report missing prefixes when more than one is provided.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 21:47:15 PDT 2020


jdoerfert added a comment.

In D90281#2358184 <https://reviews.llvm.org/D90281#2358184>, @mtrofin wrote:

> [...]
> To make sure I understand, is this capturing it: these test files are generated by a script.

The IR code is provided by us, the check lines are generated by the `llvm/utils/update_test_checks.py` script.

> A test file will always list the exact same --check-prefixes list, but then internally will only use a subset of the prefixes list.

Yes. Though the subset can change over time.

> Also for the sake of me understanding, an alternative would be to only generate the strict --check-prefixes subset that's used in the test file; but the added complexity here is that some functionality is still downstream.

No. Downstream stuff is just to make the `llvm/utils/update_test_checks.py` better and allow more check lines to be generated. This is unrelated and I should not have mentioned it.

If we reduce it to a subset, it will work just fine for now. Then someone will change something and the test will break. At that point that person needs to either put the prefixes back, run the script, remove the unused prefixes again, *or* manually update the tests. The latter is not a great option for us.

> If there were a (more terse) "--check-at-least-one-of-the-prefixes" with today's semantics, I assume the test generator produce tests using that option instead?

The run lines are written/copied by us. We could easily switch to a new option like that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90281/new/

https://reviews.llvm.org/D90281



More information about the llvm-commits mailing list