[PATCH] Add ALL to FileCheck
Renato Golin
renato.golin at linaro.org
Tue Aug 13 08:42:52 PDT 2013
On 13 August 2013 15:58, Stephen Lin <swlin at post.harvard.edu> wrote:
> What's the undocumented feature being removed exactly?
>
Hi Stephen,
Sorry, I have interpreted "command line" as the "; RUN: line, not
FileCheck's command line.
> Does FileCheck
> currently allow more than one prefix on the command line.
>
Do you propose to be able to:
FileCheck %s --check-prefix=FOO --check-prefix=BAR
and have all three: CHECK, FOO and BAR match that line?
So that three RUN lines would all match against CHECK, and also their own
explicit checks?
That would allow you to mix and match, ex:
; RUN: cmd1 | FileCheck %s -check-prefix=X86 --check-prefix=ARM
; RUN: cmd2 | FileCheck %s -check-prefix=ARM --check-prefix=MIPS
; RUN: cmd3 | FileCheck %s -check-prefix=ARM64 --check-prefix=MIPS64
; CHECK: ... will match all
; ARM: ... will match cmd1 and cmd2
; MIPS64: .. only matches cmd3
If that's your idea, I agree Matt's implementation would be a special case
where "CHECK" == "ALL".
I'm not sure which case would be solved by this, and I also don't like the
CHECK being implicit, mainly because adding new RUN lines to existing tests
will be a lot harder (since the new FileCheck will match both old and new
CHECKs). This is why I think that "ALL" makes sense, here.
If we have ALL being the joker, than having multiple prefixes adds nothing
to the solution. Unless you want NOT to have any implicit prefix, where
this would happen:
; RUN: cmd1 | FileCheck %s --check-prefix=ALL -check-prefix=X86
--check-prefix=ARM
; RUN: cmd2 | FileCheck %s --check-prefix=ALL -check-prefix=ARM
--check-prefix=MIPS
; RUN: cmd3 | FileCheck %s -check-prefix=ARM64 --check-prefix=MIPS64
; ALL: ... matches cmd1 and cmd2
; ARM: ... will match cmd1 and cmd2
; MIPS64: .. only matches cmd3
Which is more strict, but also more explicit.
In my view, we should have *either* ALL, or multiple prefixes, but not both.
cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130813/c680e686/attachment.html>
More information about the llvm-commits
mailing list