[llvm-commits] PATCH: Add CHECK-FIRST/LAST to FIleCheck

Chris Lattner clattner at apple.com
Wed Sep 30 14:53:55 PDT 2009


On Sep 30, 2009, at 2:51 PM, Argyris Kyrtzidis wrote:

> Actually, using these directives is not flexible enough, e.g you  
> can't use them to verify that the output is only one line.
>
> I attached a new patch that adds 2 command lines instead:
>
>  -empty-before    - Nothing comes before the first check
>  -empty-after      - Nothing comes after the last check
>
> If you want to make sure that the only output is the check line, you  
> do something like:
>
> // RUN: FileCheck -empty-before -empty-after
> // CHECK: foo
>
> Ok to go in ?

can't CHECK-NOT be used for this?  If a NOT could be added before the  
first line, then you could do CHECK-NOT: {{.}} or something like that.

-Chris



More information about the llvm-commits mailing list