mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Don't hang on to pointers or references after vector::push_back.
The MO reference to a MachineOperand can be invalidated by MachineInstr::addOperand. Don't even use it for debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90381 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -510,12 +510,9 @@ void SchedulePostRATDList::FixupKills(MachineBasicBlock *MBB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (MO.isKill() != kill) {
|
if (MO.isKill() != kill) {
|
||||||
bool removed = ToggleKillFlag(MI, MO);
|
DEBUG(errs() << "Fixing " << MO << " in ");
|
||||||
if (removed) {
|
// Warning: ToggleKillFlag may invalidate MO.
|
||||||
DEBUG(errs() << "Fixed <removed> in ");
|
ToggleKillFlag(MI, MO);
|
||||||
} else {
|
|
||||||
DEBUG(errs() << "Fixed " << MO << " in ");
|
|
||||||
}
|
|
||||||
DEBUG(MI->dump());
|
DEBUG(MI->dump());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user