ADT: Guarantee transferNodesFromList is only called on transfers
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 30 Aug 2016 18:00:45 +0000 (18:00 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 30 Aug 2016 18:00:45 +0000 (18:00 +0000)
commitb7668d516443231cba62e29786463587b61f90bb
tree8d1976971db0032d456bf94fac85fd95c14a1883
parent63f71057c0671ed3d06a9e939b7c360996d45623
ADT: Guarantee transferNodesFromList is only called on transfers

Guarantee that ilist_traits<T>::transferNodesFromList is only called
when nodes are actually changing lists.

I also moved all the callbacks to occur *first*, before the operation.
This is the only choice for iplist<T>::merge, so we might as well be
consistent.  I expect this to have no effect in practice, although it
simplifies the logic in both iplist<T>::transfer and iplist<T>::insert.

llvm-svn: 280122
llvm/include/llvm/ADT/ilist.h
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/lib/IR/SymbolTableListTraitsImpl.h