summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/ExecutionEngine/Orc/Core.cpp5
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");
OpenPOWER on IntegriCloud