Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions llvm/lib/ExecutionEngine/Orc/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,21 @@ ExecutionSession::IL_failSymbols(JITDylib &JD,
assert(MI.DefiningEDU->Symbols.count(NonOwningSymbolStringPtr(Name)) &&
"Symbol does not appear in its DefiningEDU");
MI.DefiningEDU->Symbols.erase(NonOwningSymbolStringPtr(Name));

// Remove this EDU from the dependants lists of its dependencies.
for (auto &[DepJD, DepSyms] : MI.DefiningEDU->Dependencies) {
for (auto DepSym : DepSyms) {
assert(DepJD->Symbols.count(SymbolStringPtr(DepSym)) &&
"DepSym not in DepJD");
assert(DepJD->MaterializingInfos.count(SymbolStringPtr(DepSym)) &&
"DepSym has not MaterializingInfo");
auto &SymMI = DepJD->MaterializingInfos[SymbolStringPtr(DepSym)];
assert(SymMI.DependantEDUs.count(MI.DefiningEDU.get()) &&
"DefiningEDU missing from DependantEDUs list of dependency");
SymMI.DependantEDUs.erase(MI.DefiningEDU.get());
}
}

MI.DefiningEDU = nullptr;
} else {
// Otherwise if there are any EDUs waiting on this symbol then move
Expand Down
Loading