diff options
| author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-11-06 17:11:12 -0500 |
|---|---|---|
| committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-11-06 17:17:27 -0500 |
| commit | 007d173e2e0c29903bc17a9d5108f531a6f2ea4d (patch) | |
| tree | 284ab716f1bce739c3021953e9e1df439b2d75b7 /llvm/lib/ExecutionEngine | |
| parent | f0f73ed8b004d213a3710b7b850e09c5bbd8e93d (diff) | |
| download | bcm5719-llvm-007d173e2e0c29903bc17a9d5108f531a6f2ea4d.tar.gz bcm5719-llvm-007d173e2e0c29903bc17a9d5108f531a6f2ea4d.zip | |
[Orc] Fix iterator usage after remove
Differential Revision: https://reviews.llvm.org/D69805
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/Core.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp index 5c7d888c2d6..9e024ba0f10 100644 --- a/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -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"); |

