53 Commits

Author SHA1 Message Date
Fedor Sergeev
7b60928bd7 [FileCheck] fixing typo in assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346723 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 01:09:53 +00:00
Fedor Sergeev
162ad1bb2a [FileCheck] introduce CHECK-COUNT-<num> repetition directive
In some cases it is desirable to match the same pattern repeatedly
many times. Currently the only way to do it is to copy the same
check pattern as many times as needed. And that gets pretty unwieldy
when its more than count is big.

Introducing CHECK-COUNT-<num> directive which acts like a plain CHECK
directive yet matches the same pattern exactly <num> times.

Extended FileCheckType to a struct to add Count there.
Changed some parsing routines to handle non-fixed length of directive
(all currently existing directives were fixed-length).

The code is generic enough to allow future support for COUNT in more
than just PlainCheck directives.

See motivating example for this feature in reviews.llvm.org/D54223.

Reviewed By: chandlerc, dblaikie
Differential Revision: https://reviews.llvm.org/D54336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346722 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 00:46:13 +00:00
Aditya Nandakumar
5718b6f1bc Refactor FileCheck to make it usable as an API
https://reviews.llvm.org/D50283
reviewed by bogner

This patch refactors FileCheck's implementation into support so it can
be used from C++ in other places (Unit tests).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339192 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-07 21:58:49 +00:00