[PATCH] D125609: [ADT] Adopt the new casting infrastructure for PointerUnion
Sheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 14 19:25:59 PDT 2022
0x59616e added reviewers: bzcheeseman, lattner, rriddle, myhsu.
0x59616e added inline comments.
================
Comment at: llvm/include/llvm/ADT/PointerUnion.h:215
+
+ static inline bool isPossible(From &f) { return f.template is<To>(); }
+
----------------
bzcheeseman wrote:
> Out of curiosity, does it make sense to implement `PointerUnion::is<T>` in terms of `isa<T>` rather than the other way around? And same for doCast below?
I'm feeling the same, too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125609/new/
https://reviews.llvm.org/D125609
More information about the llvm-commits
mailing list