@@ -759,8 +759,6 @@ void JITDylib::addDependencies(const SymbolStringPtr &Name,
759
759
760
760
// If the dependency was not in the error state then add it to
761
761
// our list of dependencies.
762
- assert (OtherJITDylib.MaterializingInfos .count (OtherSymbol) &&
763
- " No MaterializingInfo for dependency" );
764
762
auto &OtherMI = OtherJITDylib.MaterializingInfos [OtherSymbol];
765
763
766
764
if (OtherSymEntry.getState () == SymbolState::Emitted)
@@ -841,7 +839,11 @@ Error JITDylib::resolve(const SymbolMap &Resolved) {
841
839
SymI->second .setFlags (ResolvedFlags);
842
840
SymI->second .setState (SymbolState::Resolved);
843
841
844
- auto &MI = MaterializingInfos[Name];
842
+ auto MII = MaterializingInfos.find (Name);
843
+ if (MII == MaterializingInfos.end ())
844
+ continue ;
845
+
846
+ auto &MI = MII->second ;
845
847
for (auto &Q : MI.takeQueriesMeeting (SymbolState::Resolved)) {
846
848
Q->notifySymbolMetRequiredState (Name, ResolvedSym);
847
849
Q->removeQueryDependence (*this , Name);
@@ -909,8 +911,14 @@ Error JITDylib::emit(const SymbolFlagsMap &Emitted) {
909
911
SymEntry.setState (SymbolState::Emitted);
910
912
911
913
auto MII = MaterializingInfos.find (Name);
912
- assert (MII != MaterializingInfos.end () &&
913
- " Missing MaterializingInfo entry" );
914
+
915
+ // If this symbol has no MaterializingInfo then it's trivially ready.
916
+ // Update its state and continue.
917
+ if (MII == MaterializingInfos.end ()) {
918
+ SymEntry.setState (SymbolState::Ready);
919
+ continue ;
920
+ }
921
+
914
922
auto &MI = MII->second ;
915
923
916
924
// For each dependant, transfer this node's emitted dependencies to
0 commit comments