diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 3b486d61ed23..318259d7f5f1 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -66,12 +66,12 @@ void ilist_traits::removeNodeFromList(MachineInstr* N) { } void ilist_traits::transferNodesFromList( - iplist >& toList, + iplist >& fromList, ilist_iterator first, ilist_iterator last) { - if (parent != toList.parent) + if (parent != fromList.parent) for (; first != last; ++first) - first->parent = toList.parent; + first->parent = parent; } MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {