[PATCH] D39437: Fix a bunch of assert-on-invalid-bitcode regressions after 315483

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 00:00:11 PDT 2017


>
> How about just changing consumeError to return bool and the above becomes
>


return consumeError(ExpectedSomethig);


This seems like a good idea to me, but please make it a new function and
name it errorToBool: The name is clearer, and matches the scheme for the
other error idiom conversion: errorToErrorCode.

-- Lang.

On Tue, Oct 31, 2017 at 12:21 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> I think we need a convenience function that is the correct version of
>
> return bool(ExpectedSomethig);
>
> otherwise we have to inline the check everywhere. How about just
> changing consumeError to return bool and the above becomes
>
> return consumeError(ExpectedSomethig);
>
> Cheers,
> Rafael
>
> Nico Weber via Phabricator <reviews at reviews.llvm.org> writes:
>
> > thakis added a comment.
> >
> > https://reviews.llvm.org/rL315477, https://reviews.llvm.org/rL315475,
> https://reviews.llvm.org/rL315474, https://reviews.llvm.org/rL315473,
> https://reviews.llvm.org/rL315376, https://reviews.llvm.org/rL315354 seem
> to not have introduced bugs of this type as far as I can tell.
> >
> >
> > https://reviews.llvm.org/D39437
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171031/51c6f0e8/attachment.html>


More information about the llvm-commits mailing list