[PATCH] D53710: [FileCheck] Warn if a prefix is only used in LABEL checks

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 26 08:49:59 PDT 2018


probinson added a comment.

In https://reviews.llvm.org/D53710#1277353, @jdenny wrote:

> In https://reviews.llvm.org/D53710#1277094, @SjoerdMeijer wrote:
>
> > Thanks for looking at this! Answering this one first:
> >
> > > Have you run existing test suites to see how many warnings you get?
> >
> > I just did, and it came back with some interesting results. For example `test/CodeGen/ARM/Windows/mangling.ll`:
> >
> >   ; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -o - %s | FileCheck %s
> >   define void @function() nounwind {
> >   entry:
> >     ret void
> >   }
> >   ; CHECK-LABEL: function
> >    
> >
> > This shows that just checking the label is actually a use-case, which is why I thought a warning would be better; looks like we can't promote it to an error (which is okay I think).
>
>
> Why isn't that just CHECK?  Is that a legitimate use case?


CHECK-LABEL will complain if it doesn't find a matching string, so the test would fail if the label text does not appear.
However, it's not really a proper use of LABEL, and it would be better to have this test just use CHECK.


https://reviews.llvm.org/D53710





More information about the llvm-commits mailing list