[PATCH] D22249: Get rid of bool parameters in SelectionDAG::getLoad, getStore, and friends.

Stephan Bergmann via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 09:40:58 PDT 2016


sberg added a subscriber: sberg.
sberg added a comment.

In http://reviews.llvm.org/D22249#481774, @jlebar wrote:

> In http://reviews.llvm.org/D22249#481459, @grandinj wrote:
>
> > Seeing this, you might be interested in the enum/bitset library we use in LibreOffice:
> >
> >   https://cgit.freedesktop.org/libreoffice/core/tree/include/o3tl/typed_flags_set.hxx
> >   
> >
> > for stuff like this
>
>
> That looks pretty similar to what we had in mind.  One part I can't seem to figure out is, why do we have the Wrap class at all?  Is it just so you can avoid some of the assertions?


that Wrap class is there so that all the operator overloads are only actually available (via SFINAE) for enums that opt into this via an explicit specialization of template<> struct o3tl::typed_flags<TheE>: o3tl::is_typed_flags<TheE, TheM> {};


http://reviews.llvm.org/D22249





More information about the llvm-commits mailing list