[PATCH] D33125: Introduce isoneof<T0, T1, ...> as an extension of isa<T>
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 09:21:55 PDT 2017
dberlin added a comment.
I actually like this syntax, because i think it's more concise *and* significantly less prone to errors (for the reason serge pointed out).
We *could* make it faster if we wanted (I think we could metaprogram a version that used switch if it could and there are greater than X args).
The other way requires every caller to be cognizant of when switch becomes more performant, and implement it themselves.
Bottom line: I'd rather see it abstracted than not abstracted.
Repository:
rL LLVM
https://reviews.llvm.org/D33125
More information about the llvm-commits
mailing list