[PATCH] D33125: Introduce isoneof<T0, T1, ...> as an extension of isa<T>
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 20 16:57:51 PDT 2017
sanjoy added a comment.
In https://reviews.llvm.org/D33125#760296, @chandlerc wrote:
> Another high-level comment: I don't like the name `isoneof`. To me, that parses to the relationship being tested `is` rather than `isa` which loses an important distinction. I'm not really sure what would be the best name though.
One possibility is to figure out the C++ to make code like this work:
if (isa<oneof<T0, T1, T2>>(X))
...;
That's a bit more verbose, but we can read `oneof<T0, T1, T2>` as a sum type of `T0`, `T1` and `T2`. I'd even be up for calling it `sum` or `sumty`, but not sure how others feel about that.
Repository:
rL LLVM
https://reviews.llvm.org/D33125
More information about the llvm-commits
mailing list