[cfe-dev] clang target tests

David Greene via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 7 10:37:23 PDT 2018


Tim Northover <t.p.northover at gmail.com> writes:

> Hi David,
>
> On Fri, 7 Sep 2018 at 15:53, David Greene via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
>> Unfortunately, I can't have the test emit LLVM IR because that won't
>> contain what I need to test.  I can't make it an LLVM test because I'm
>> testing the interaction of options to clang.
>
> There ought to be *some* trace, either in the cc1 options (in which
> case you'd write a Driver test and an LLVM one), or in the IR. That
> said, I won't second guess you...

Possibly.  I will think a bit harder.  A Driver test may be what I'm
looking for.

>> How does cmake/lit decide whether tests in test/CodeGen should be run or
>> not?  Take test/CodeGen/x86.c.  It's looking for register name specific
>> to an x86 target.  How does the testing infrastructure know not to run
>> this test if clang is built without support for x86?
>
> That particular test doesn't need a backend because it only checks
> LLVM IR. But what you're looking for is "REQUIRES:
> x86-registered-target" (or similar if you're not testing x86).

Ok, thanks.

                              -David



More information about the cfe-dev mailing list