<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 7, 2018 at 10:29 AM Tim Northover via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
On Fri, 7 Sep 2018 at 15:53, David Greene via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
> Unfortunately, I can't have the test emit LLVM IR because that won't<br>
> contain what I need to test.  I can't make it an LLVM test because I'm<br>
> testing the interaction of options to clang.<br>
<br>
There ought to be *some* trace, either in the cc1 options (in which<br>
case you'd write a Driver test and an LLVM one), or in the IR. </blockquote><div><br>There are some small gaps - where the interaction between Clang and LLVM is purely done via API, rather than command line or IR. For example things like MCOptions, TargetOptions, etc - if you change Clang to compute the parameters to those options differently (or regressed that functionality by not initializing those options correctly, etc) pure clang (command line + source => IR) or LLVM (IR => assembly), etc, couldn't catch it. In many cases those options can be moved to the IR, but some don't make sense/need to be there.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That<br>
said, I won't second guess you...<br></blockquote><div><br>I will a little bit - it'd be good to see the thing being tested just to understand if it is one of those gaps.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> How does cmake/lit decide whether tests in test/CodeGen should be run or<br>
> not?  Take test/CodeGen/x86.c.  It's looking for register name specific<br>
> to an x86 target.  How does the testing infrastructure know not to run<br>
> this test if clang is built without support for x86?<br>
<br>
That particular test doesn't need a backend because it only checks<br>
LLVM IR. But what you're looking for is "REQUIRES:<br>
x86-registered-target" (or similar if you're not testing x86).<br>
<br>
Cheers.<br>
<br>
Tim.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>