[PATCH] D142162: [Dominators] Introduce DomTreeNodeTraits to allow customization. (NFC)
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 08:01:50 PST 2023
kuhar added inline comments.
================
Comment at: llvm/include/llvm/Support/GenericDomTree.h:240-244
+/// DomTreeNode traits specialization to use DomTreeTraitsCustom if it is
+/// defined for NodeT.
+template <typename NodeT>
+struct DomTreeNodeTraits<
+ NodeT, std::void_t<typename DomTreeNodeTraitsCustom<NodeT>::ParentPtrTy>> {
----------------
Do we need this? I'd think one could just directly specialize `DomTreeNodeTraits` for their type without the need for the second template parameter and `DomTreeNodeTraitsCustom`:
```
namespace llvm {
template <>
struct DomTreeNodeTraits<MyNodeType> {
...
};
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142162/new/
https://reviews.llvm.org/D142162
More information about the llvm-commits
mailing list