[llvm] r214210 - Fix FileCheck crash when empty prefix is passed.
Eli Bendersky
eliben at google.com
Tue Jul 29 16:07:26 PDT 2014
On Tue, Jul 29, 2014 at 3:35 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Tue, Jul 29, 2014 at 1:30 PM, Eli Bendersky <eliben at google.com> wrote:
> > Author: eliben
> > Date: Tue Jul 29 15:30:53 2014
> > New Revision: 214210
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=214210&view=rev
> > Log:
> > Fix FileCheck crash when empty prefix is passed.
>
> Test case?
r214239. Thanks.
> (we do have some FileCheck tests, I think)
>
Yes, we do. Having just looked at the log of FileCheck tests, I'll go hide
in shame...
Eli
>
> >
> >
> > Modified:
> > llvm/trunk/utils/FileCheck/FileCheck.cpp
> >
> > Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=214210&r1=214209&r2=214210&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
> > +++ llvm/trunk/utils/FileCheck/FileCheck.cpp Tue Jul 29 15:30:53 2014
> > @@ -1212,6 +1212,10 @@ static bool ValidateCheckPrefixes() {
> > I != E; ++I) {
> > StringRef Prefix(*I);
> >
> > + // Reject empty prefixes.
> > + if (Prefix == "")
> > + return false;
> > +
> > if (!PrefixSet.insert(Prefix))
> > return false;
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140729/3eab1ddf/attachment.html>
More information about the llvm-commits
mailing list