[cfe-dev] clang target tests

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 7 10:29:05 PDT 2018


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...

> 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).

Cheers.

Tim.



More information about the cfe-dev mailing list