[PATCH] D103223: [ADT][WIP] Proof of concept impl of generic visit for PointerUnion

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 19:57:42 PDT 2021


dblaikie added inline comments.


================
Comment at: llvm/include/llvm/ADT/PointerUnion.h:282
+  static constexpr size_t getIndex(const PointerUnion<PTs...> &Variant) {
+    return Variant.Val.getInt();
+  }
----------------
Is this the only reason the variant traits needs to be befriended by the PointerUnion? If so, perhaps this API could be exposed in PointerUnion's public API rather than using friendship?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103223/new/

https://reviews.llvm.org/D103223



More information about the llvm-commits mailing list