forked from OSchip/llvm-project
[Orc] Fix iterator usage after remove
Differential Revision: https://reviews.llvm.org/D69805
This commit is contained in:
parent
f0f73ed8b0
commit
007d173e2e
|
@ -1228,11 +1228,14 @@ void JITDylib::notifyFailed(FailedSymbolsWorklist Worklist) {
|
|||
MI.UnemittedDependencies.clear();
|
||||
|
||||
// Collect queries to be failed for this MII.
|
||||
AsynchronousSymbolQueryList ToDetach;
|
||||
for (auto &Q : MII->second.pendingQueries()) {
|
||||
// Add the query to the list to be failed and detach it.
|
||||
FailedQueries.insert(Q);
|
||||
Q->detach();
|
||||
ToDetach.push_back(Q);
|
||||
}
|
||||
for (auto &Q : ToDetach)
|
||||
Q->detach();
|
||||
|
||||
assert(MI.Dependants.empty() &&
|
||||
"Can not delete MaterializingInfo with dependants still attached");
|
||||
|
|
Loading…
Reference in New Issue