properly encapsulate the parent field of MBB and MI with get/set accessors.
llvm-svn: 45469
This commit is contained in:
@@ -111,12 +111,14 @@ MachineBasicBlock* ilist_traits<MachineBasicBlock>::createSentinel() {
|
||||
}
|
||||
|
||||
void ilist_traits<MachineBasicBlock>::transferNodesFromList(
|
||||
iplist<MachineBasicBlock, ilist_traits<MachineBasicBlock> >& toList,
|
||||
ilist_iterator<MachineBasicBlock> first,
|
||||
ilist_iterator<MachineBasicBlock> last) {
|
||||
if (Parent != toList.Parent)
|
||||
for (; first != last; ++first)
|
||||
first->Parent = toList.Parent;
|
||||
iplist<MachineBasicBlock, ilist_traits<MachineBasicBlock> >& toList,
|
||||
ilist_iterator<MachineBasicBlock> first,
|
||||
ilist_iterator<MachineBasicBlock> last) {
|
||||
// If splicing withing the same function, no change.
|
||||
if (Parent == toList.Parent) return;
|
||||
|
||||
for (; first != last; ++first)
|
||||
first->setParent(toList.Parent);
|
||||
}
|
||||
|
||||
MachineFunction::MachineFunction(const Function *F,
|
||||
|
||||
Reference in New Issue
Block a user