[PATCH] D54336: [FileCheck] introduce CHECK-COUNT-<num> repetition directive
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 9 11:17:47 PST 2018
fedor.sergeev created this revision.
fedor.sergeev added reviewers: chandlerc, jdenny.
Herald added a subscriber: kristina.
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/https://reviews.llvm.org/D54223.
Repository:
rL LLVM
https://reviews.llvm.org/D54336
Files:
include/llvm/Support/FileCheck.h
lib/Support/FileCheck.cpp
test/FileCheck/check-count.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54336.173392.patch
Type: text/x-patch
Size: 21418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181109/9b76747a/attachment.bin>
More information about the llvm-commits
mailing list