diff --git a/llvm/include/llvm/ADT/ilist_node.h b/llvm/include/llvm/ADT/ilist_node.h index 8d78d5dbbda44..2af1c6ebbffce 100644 --- a/llvm/include/llvm/ADT/ilist_node.h +++ b/llvm/include/llvm/ADT/ilist_node.h @@ -51,12 +51,11 @@ class ilist_iterator_w_bits; template class ilist_sentinel; // Selector for which iterator type to pick given the iterator-bits node option. -template -struct ilist_select_iterator_type { - using type = std::conditional_t, - ilist_iterator>; -}; +template +using ilist_select_iterator_type = + std::conditional_t, + ilist_iterator>; /// Implementation for an ilist node. /// @@ -91,18 +90,12 @@ class ilist_node_impl friend class ilist_iterator_w_bits; protected: - using self_iterator = - typename ilist_select_iterator_type::type; - using const_self_iterator = - typename ilist_select_iterator_type::type; + using self_iterator = ilist_select_iterator_type; + using const_self_iterator = ilist_select_iterator_type; using reverse_self_iterator = - typename ilist_select_iterator_type::type; + ilist_select_iterator_type; using const_reverse_self_iterator = - typename ilist_select_iterator_type::type; + ilist_select_iterator_type; ilist_node_impl() = default; diff --git a/llvm/include/llvm/ADT/simple_ilist.h b/llvm/include/llvm/ADT/simple_ilist.h index 7236b3fa5a7d2..fcb2e41f62bf0 100644 --- a/llvm/include/llvm/ADT/simple_ilist.h +++ b/llvm/include/llvm/ADT/simple_ilist.h @@ -92,18 +92,11 @@ class simple_ilist using reference = typename OptionsT::reference; using const_pointer = typename OptionsT::const_pointer; using const_reference = typename OptionsT::const_reference; - using iterator = - typename ilist_select_iterator_type::type; - using const_iterator = - typename ilist_select_iterator_type::type; - using reverse_iterator = - typename ilist_select_iterator_type::type; + using iterator = ilist_select_iterator_type; + using const_iterator = ilist_select_iterator_type; + using reverse_iterator = ilist_select_iterator_type; using const_reverse_iterator = - typename ilist_select_iterator_type::type; + ilist_select_iterator_type; using size_type = size_t; using difference_type = ptrdiff_t;