aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2023-04-24 22:23:38 -0700
committerOwen Anderson <resistor@mac.com>2023-04-24 22:42:05 -0700
commit17a3fbf2a3683f862de52e0058110eb8b356be56 (patch)
tree8a9be45b30f15bc188d35da21d7d43b0f788eba9
parentbdbc6c6c325adb6fc55b1e6228fef7c52b3d6731 (diff)
downloadllvm-17a3fbf2a3683f862de52e0058110eb8b356be56.zip
llvm-17a3fbf2a3683f862de52e0058110eb8b356be56.tar.gz
llvm-17a3fbf2a3683f862de52e0058110eb8b356be56.tar.bz2
Remove code only needed to detect a pre-4.0 API break.
Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D149122
-rw-r--r--llvm/include/llvm/ADT/ilist.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/llvm/include/llvm/ADT/ilist.h b/llvm/include/llvm/ADT/ilist.h
index 9913b7c..aed19cc 100644
--- a/llvm/include/llvm/ADT/ilist.h
+++ b/llvm/include/llvm/ADT/ilist.h
@@ -92,63 +92,6 @@ struct ilist_traits : public ilist_node_traits<NodeTy> {};
/// Const traits should never be instantiated.
template <typename Ty> struct ilist_traits<const Ty> {};
-namespace ilist_detail {
-
-template <class T> T &make();
-
-/// Type trait to check for a traits class that has a getNext member (as a
-/// canary for any of the ilist_nextprev_traits API).
-template <class TraitsT, class NodeT> struct HasGetNext {
- typedef char Yes[1];
- typedef char No[2];
- template <size_t N> struct SFINAE {};
-
- template <class U>
- static Yes &test(U *I, decltype(I->getNext(&make<NodeT>())) * = nullptr);
- template <class> static No &test(...);
-
-public:
- static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes);
-};
-
-/// Type trait to check for a traits class that has a createSentinel member (as
-/// a canary for any of the ilist_sentinel_traits API).
-template <class TraitsT> struct HasCreateSentinel {
- typedef char Yes[1];
- typedef char No[2];
-
- template <class U>
- static Yes &test(U *I, decltype(I->createSentinel()) * = nullptr);
- template <class> static No &test(...);
-
-public:
- static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes);
-};
-
-/// Type trait to check for a traits class that has a createNode member.
-/// Allocation should be managed in a wrapper class, instead of in
-/// ilist_traits.
-template <class TraitsT, class NodeT> struct HasCreateNode {
- typedef char Yes[1];
- typedef char No[2];
- template <size_t N> struct SFINAE {};
-
- template <class U>
- static Yes &test(U *I, decltype(I->createNode(make<NodeT>())) * = 0);
- template <class> static No &test(...);
-
-public:
- static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes);
-};
-
-template <class TraitsT, class NodeT> struct HasObsoleteCustomization {
- static const bool value = HasGetNext<TraitsT, NodeT>::value ||
- HasCreateSentinel<TraitsT>::value ||
- HasCreateNode<TraitsT, NodeT>::value;
-};
-
-} // end namespace ilist_detail
-
//===----------------------------------------------------------------------===//
//
/// A wrapper around an intrusive list with callbacks and non-intrusive
@@ -182,13 +125,6 @@ public:
typename base_list_type::const_reverse_iterator const_reverse_iterator;
private:
- // TODO: Drop this assertion and the transitive type traits anytime after
- // v4.0 is branched (i.e,. keep them for one release to help out-of-tree code
- // update).
- static_assert(
- !ilist_detail::HasObsoleteCustomization<TraitsT, value_type>::value,
- "ilist customization points have changed!");
-
static bool op_less(const_reference L, const_reference R) { return L < R; }
static bool op_equal(const_reference L, const_reference R) { return L == R; }