ADT: Remove the ilist_nextprev_traits customization point
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 12 Aug 2016 17:32:34 +0000 (17:32 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 12 Aug 2016 17:32:34 +0000 (17:32 +0000)
commit0a4d57172a7fe9946742461318ef4a5b02b6c29d
treefdfa5ea3ff2e95db78e73bc4a88a2a5aede8316f
parent31b8399beb529ceb16cc1a2e24a36edf773cf88b
ADT: Remove the ilist_nextprev_traits customization point

No one is using the capability to implement next and prev another way
(since lld stopped doing it in r278468).  Remove the customization point
by moving the API from ilist_nextprev_traits<T> to ilist_node_access.

The old traits class is still useful/necessary API as a target for
friends of node types that inherit privately from ilist_node.
Eventually I plan to either remove it entirely or move the template
parameters to the methods.

(Note: if there's desire to bring back customization of next/prev
pointers in the future (e.g., to pack some bits in there), I think a
traits class like this is an awkward way to accomplish it.  Instead, we
should change ilist<T> to be ilist<ilist_node<T>>, and give an extra
template parameter to ilist_node.)

llvm-svn: 278532
llvm/include/llvm/ADT/ilist.h
llvm/include/llvm/ADT/ilist_node.h
llvm/include/llvm/IR/SymbolTableListTraits.h