[PATCH] D141260: [Dominators] Remove requirement to use NodeRef->getParent().

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 18:08:08 PST 2023


kuhar added inline comments.


================
Comment at: llvm/include/llvm/Support/GenericDomTree.h:228-229
+/// T::getParent's return type otherwise.
+template <typename T, typename = void> struct dt_get_parent_ptr_ty {
+  using type = decltype(std::declval<T>()->getParent());
+};
----------------
What do you think about making this a little bit more general, say: `struct DominatorTreeNodeTraits` and moving `NodePtr`/`ParentType`/`GraphTraits` (from D142162) there as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141260



More information about the llvm-commits mailing list