<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 17, 2015 at 4:30 AM Dimitry Andric <<a href="mailto:dimitry@andric.com">dimitry@andric.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 16 Oct 2015, at 01:47, Eric Christopher via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: echristo<br>
> Date: Thu Oct 15 18:47:11 2015<br>
> New Revision: 250473<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=250473&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=250473&view=rev</a><br>
> Log:<br>
> Add an error when calling a builtin that requires features that don't<br>
> match the feature set of the function that they're being called from.<br>
...<br>
> +def err_builtin_needs_feature : Error<"%0 needs target feature %1">;<br>
<br>
Thanks.  Note, a typical error message now becomes something pretty terse, like this:<br>
<br>
'__builtin_foo' needs target feature bar<br>
<br>
It would be helpful if the error message gave some sort of hint on what the actual problem is (wrong -march parameter, probably?), and how to fix it.<br></blockquote><div><br></div><div>Could get an actual mapping of command line to target feature I suppose and use that. Would require, likely, a mapping of command line option to target feature in TargetInfo with a default implementation that just returns the string as a feature for targets that don't bother to implement as the current implementation is actually target neutral.</div><div><br></div><div>I thought about using minimum command line options in the builtins but that's more difficult to construct up. </div><div><br></div><div>In short, very possible to do this, a bit of typing.</div><div><br></div><div>-eric</div></div></div>