[llvm-dev] Writing tests with Filecheck without emitting output to stdin

Mahesh Attarde via llvm-dev llvm-dev at lists.llvm.org
Sat Mar 31 06:27:23 PDT 2018


That works. Thanks.

One more followup question though.
Once i run opt on bitcode, there is not useful output/transform on bitcode.
this rpt files are extra.
I am hoping to do something like this,

; RUN: FileCheck  --input-file=a.rpt.gold --check-prefix=CHECK-A < a.rpt
; RUN: FileCheck  --input-file=b.rpt.gold --check-prefix=CHECK-B < b.rpt

i did not find much examples in tests hence question.
does this have any potential issue in matching.

~Mahesh


On Sat, Mar 31, 2018 at 5:08 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> Hi Mahesh,
>
> On 31 March 2018 at 11:45, Mahesh Attarde via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > opt --my-pass <%s | Filecheck  %s
> >
> > --my-pass generates  files a.rpt b.rpt c.rpt . How do i write test
> without
> > writing all 3 files to stdin.
>
> You can run FileCheck over them on separate RUN lines assuming you
> know the filename (which I assume you do since you'd be completely
> screwed without it).
>
> ; RUN: FileCheck %s --check-prefix=CHECK-A < a.rpt
> ; RUN: FileCheck %s --check-prefix=CHECK-B < b.rpt
> ; RUN: FileCheck %s --check-prefix=CHECK-C < c.rpt
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180331/58c9f35e/attachment.html>


More information about the llvm-dev mailing list