[PATCH] D24686: [support] Some improvements to StringSwitch

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 11:06:22 PDT 2016


On Tue, Oct 4, 2016 at 12:11 AM Chandler Carruth via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> chandlerc accepted this revision.
>
> chandlerc added a reviewer: chandlerc.
>
> chandlerc added a comment.
>
>
>
> LGTM as well. I like the FooLower pattern. While somewhat verbose and
> repetitive, it seems much more clear and obvious to the reader. It is also
> much simpler.
>

Personally I think I'd have voted for flags passed to the Switch function,
somewhat as Rui was suggesting:

  x = StringSwitch(y, CaseInsensitive).Case(...).Case(...);

I wouldn't really want to have that explosion of variations (mixing case
sensitive and insensitive, etc) until we've got a particular use case, it
seems pretty niche.

- Dave


>
>
>
>
>
> https://reviews.llvm.org/D24686
>
>
>
>
>
>
>
> _______________________________________________
>
> llvm-commits mailing list
>
> llvm-commits at lists.llvm.org
>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161010/13aedb63/attachment-0001.html>


More information about the llvm-commits mailing list