<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 11:00 AM, Filipe Cabecinhas <span dir="ltr"><<a href="mailto:filcab+llvm.phabricator@gmail.com" target="_blank">filcab+llvm.phabricator@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">True. What's the usual test harness to make sure the verifier aborts, though?<br>
If both the binary and the text parsers assert before generating IR,<br>
and you're adding the instruction, so there's no other thing that<br>
generates one, how do you test that assert? Or do we just let them be<br>
and hope we don't end up out of sync? :-)<br></blockquote><div><br></div><div>You'd test the assert by constructing some IR from the C++ interface (using a unit test or something similar) and then run the verifier.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you,<br>
 Filipe<br>
<div><div class="h5"><br>
On Tue, Jan 24, 2017 at 6:41 PM, David Majnemer via Phabricator via<br>
llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> majnemer added inline comments.<br>
><br>
><br>
> ================<br>
> Comment at: lib/AsmParser/LLParser.cpp:<wbr>5914<br>
> +  if (!Op->getType()->isIntegerTy()<wbr>)<br>
> +    return Error(Loc, "cannot freeze non-integer type");<br>
> +<br>
> ----------------<br>
> filcab wrote:<br>
>> filcab wrote:<br>
>> > Please test this error.<br>
>> Even better: Should this be in the verifier only? Otherwise you're checking for the same thing in two places, which is easy to get out of sync. (Would still require a test)<br>
> its not bad for them to be in both, the error messages are much nicer in the parser.<br>
><br>
><br>
> <a href="https://reviews.llvm.org/D29011" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D29011</a><br>
><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>