mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
AArch64: avoid deleting the current iterator in a loop.
std::map invalidates the iterator to any element that gets deleted, which means we can't increment it correctly afterwards. This was causing Darwin test failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5714db474a
commit
1968324efa
@ -671,13 +671,14 @@ maybeKillChain(MachineOperand &MO, unsigned Idx,
|
||||
} else if (MO.isRegMask()) {
|
||||
|
||||
for (auto I = ActiveChains.begin(), E = ActiveChains.end();
|
||||
I != E; ++I) {
|
||||
I != E;) {
|
||||
if (MO.clobbersPhysReg(I->first)) {
|
||||
DEBUG(dbgs() << "Kill (regmask) seen for chain "
|
||||
<< TRI->getName(I->first) << "\n");
|
||||
I->second->setKill(MI, Idx, /*Immutable=*/true);
|
||||
ActiveChains.erase(I);
|
||||
}
|
||||
ActiveChains.erase(I++);
|
||||
} else
|
||||
++I;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user