[llvm] r335664 - [ORC] Reset AsynchronousSymbolQuery's NotifySymbolsResolved callback on error.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 13:59:50 PDT 2018
Author: lhames
Date: Tue Jun 26 13:59:50 2018
New Revision: 335664
URL: http://llvm.org/viewvc/llvm-project?rev=335664&view=rev
Log:
[ORC] Reset AsynchronousSymbolQuery's NotifySymbolsResolved callback on error.
AsynchronousSymbolQuery::canStillFail checks the value of the callback to
prevent sending it redundant error notifications, so we need to reset it after
running it.
Modified:
llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
Modified: llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=335664&r1=335663&r2=335664&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp Tue Jun 26 13:59:50 2018
@@ -196,13 +196,14 @@ void AsynchronousSymbolQuery::handleFail
assert(QueryRegistrations.empty() && ResolvedSymbols.empty() &&
NotYetResolvedCount == 0 && NotYetReadyCount == 0 &&
"Query should already have been abandoned");
- if (NotifySymbolsResolved)
+ if (NotifySymbolsResolved) {
NotifySymbolsResolved(std::move(Err));
- else {
+ NotifySymbolsResolved = SymbolsResolvedCallback();
+ } else {
assert(NotifySymbolsReady && "Failed after both callbacks issued?");
NotifySymbolsReady(std::move(Err));
- NotifySymbolsReady = SymbolsReadyCallback();
}
+ NotifySymbolsReady = SymbolsReadyCallback();
}
void AsynchronousSymbolQuery::addQueryDependence(VSO &V, SymbolStringPtr Name) {
More information about the llvm-commits
mailing list