File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
llvm/lib/ExecutionEngine/Orc Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1001,16 +1001,18 @@ void JITDylib::addDependencies(const SymbolStringPtr &Name,
1001
1001
// Check the sym entry for the dependency.
1002
1002
auto OtherSymI = OtherJITDylib.Symbols .find (OtherSymbol);
1003
1003
1004
- #ifndef NDEBUG
1005
1004
// Assert that this symbol exists and has not reached the ready state
1006
1005
// already.
1007
1006
assert (OtherSymI != OtherJITDylib.Symbols .end () &&
1008
- (OtherSymI->second .getState () < SymbolState::Ready &&
1009
- " Dependency on emitted/ready symbol" ));
1010
- #endif
1007
+ " Dependency on unknown symbol" );
1011
1008
1012
1009
auto &OtherSymEntry = OtherSymI->second ;
1013
1010
1011
+ // If the other symbol is already in the Ready state then there's no
1012
+ // dependency to add.
1013
+ if (OtherSymEntry.getState () == SymbolState::Ready)
1014
+ continue ;
1015
+
1014
1016
// If the dependency is in an error state then note this and continue,
1015
1017
// we will move this symbol to the error state below.
1016
1018
if (OtherSymEntry.getFlags ().hasError ()) {
You can’t perform that action at this time.
0 commit comments