<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 3:35 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Tue, Jul 29, 2014 at 1:30 PM, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:<br>


> Author: eliben<br>
> Date: Tue Jul 29 15:30:53 2014<br>
> New Revision: 214210<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=214210&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=214210&view=rev</a><br>
> Log:<br>
> Fix FileCheck crash when empty prefix is passed.<br>
<br>
</div>Test case? </blockquote><div><br></div><div>r214239. Thanks.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">(we do have some FileCheck tests, I think)<br>

</blockquote><div><br></div><div>Yes, we do. Having just looked at the log of FileCheck tests, I'll go hide in shame...</div><div><br></div><div>Eli</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> Modified:<br>
>     llvm/trunk/utils/FileCheck/FileCheck.cpp<br>
><br>
> Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=214210&r1=214209&r2=214210&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=214210&r1=214209&r2=214210&view=diff</a><br>


> ==============================================================================<br>
> --- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)<br>
> +++ llvm/trunk/utils/FileCheck/FileCheck.cpp Tue Jul 29 15:30:53 2014<br>
> @@ -1212,6 +1212,10 @@ static bool ValidateCheckPrefixes() {<br>
>         I != E; ++I) {<br>
>      StringRef Prefix(*I);<br>
><br>
> +    // Reject empty prefixes.<br>
> +    if (Prefix == "")<br>
> +      return false;<br>
> +<br>
>      if (!PrefixSet.insert(Prefix))<br>
>        return false;<br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>