diff options
author | Lang Hames <lhames@gmail.com> | 2019-08-26 21:42:47 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2019-08-26 21:42:47 +0000 |
commit | 8ec96618700f02efca1eb6a7c8d0e355f577071e (patch) | |
tree | 278c2a5acc09d72b021b713522bb545ecd0bc683 /llvm/lib/ExecutionEngine/Orc | |
parent | 1266191d6fe7bc1f0b85ec2fc8a1dcaf1363de54 (diff) | |
download | bcm5719-llvm-8ec96618700f02efca1eb6a7c8d0e355f577071e.tar.gz bcm5719-llvm-8ec96618700f02efca1eb6a7c8d0e355f577071e.zip |
[ORC] Fix an overly aggressive assert.
Symbols that have not been queried will not have MaterializingInfo entries,
so remove the assert that all failed symbols should have these entries.
Also updates the loop to only remove entries that were found earlier.
llvm-svn: 369975
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/Core.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp index 15c9578e691..123e5679ae2 100644 --- a/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -1187,6 +1187,8 @@ void JITDylib::notifyFailed(const SymbolFlagsMap &FailedSymbols) { AsynchronousSymbolQuerySet FailedQueries; ES.runSessionLocked([&]() { + std::vector<const SymbolStringPtr *> MaterializerNamesToFail; + for (auto &KV : FailedSymbols) { auto &Name = KV.first; @@ -1207,6 +1209,7 @@ void JITDylib::notifyFailed(const SymbolFlagsMap &FailedSymbols) { continue; auto &MI = MII->second; + MaterializerNamesToFail.push_back(&KV.first); // Move all dependants to the error state and disconnect from them. for (auto &KV : MI.Dependants) { @@ -1261,9 +1264,9 @@ void JITDylib::notifyFailed(const SymbolFlagsMap &FailedSymbols) { Q->detach(); // Remove the MaterializingInfos. - for (auto &KV : FailedSymbols) { - assert(MaterializingInfos.count(KV.first) && "Expected MI for Name"); - MaterializingInfos.erase(KV.first); + while (!MaterializerNamesToFail.empty()) { + MaterializingInfos.erase(*MaterializerNamesToFail.back()); + MaterializerNamesToFail.pop_back(); } }); |