diff options
author | Lang Hames <lhames@gmail.com> | 2018-06-26 20:59:50 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-06-26 20:59:50 +0000 |
commit | 2795a0a06e92a296672a8e1bd7056bb7ecc6fd6a (patch) | |
tree | a1dcd6c9c5d6135884c4281003635a62bf590397 /llvm/lib | |
parent | 831c575829611507e0b360c985aa06efbc4fa075 (diff) | |
download | bcm5719-llvm-2795a0a06e92a296672a8e1bd7056bb7ecc6fd6a.tar.gz bcm5719-llvm-2795a0a06e92a296672a8e1bd7056bb7ecc6fd6a.zip |
[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.
llvm-svn: 335664
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/Core.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp index 5d28c882076..53e4a853b35 100644 --- a/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -196,13 +196,14 @@ void AsynchronousSymbolQuery::handleFailed(Error Err) { 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) { |