forked from OSchip/llvm-project
Fix iterator-invalidation issue
Inserting a new key into a DenseMap potentially invalidates iterators into that map. Trying to fix an issue from r289755 triggering this assertion: Assertion `isHandleInSync() && "invalid iterator access!"' failed. llvm-svn: 289757
This commit is contained in:
parent
3ca4a6bcf1
commit
321053a7ca
|
@ -3529,7 +3529,9 @@ void ScalarEvolution::addAffectedFromOperands(const SCEV *S) {
|
|||
if (AMI == AffectedMap.end())
|
||||
continue;
|
||||
|
||||
AffectedMap[S].insert(AMI->second.begin(), AMI->second.end());
|
||||
auto &ISet = AffectedMap[S];
|
||||
AMI = AffectedMap.find(Op);
|
||||
ISet.insert(AMI->second.begin(), AMI->second.end());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue