[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:28:10 PDT 2022
0x59616e added a comment.
In D125609#3513978 <https://reviews.llvm.org/D125609#3513978>, @0x59616e wrote:
> Given that I'm still young to C++ and llvm, every suggestion, even the
> one you feel it's trivial, are very welcomed ;)
>
> This diff comes with the following updates:
>
> - Define PointerUnion::is and ::get in terms of isa<T> and cast<T>.
> - Add `FIXME` comment for is(), get() and dyn_cast().
Also, `CastInfoPointerUnionImpl` is defined and declared as a friend of PointerUnion, to support `isa<T>` and `cast<T>` directly rather than calling into `PointerUnion::is` and `PointerUnion::get`.
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