[ORC] Fix fall-through in error case in EPCGenericDylibManager::lookupAsync.

In the event of a serialization error (e.g. due to a network dropout) we should
only run the Complete handler once, passing the serialization error value.

No test-case: This would require a deliberately injected failure in a
remote-JIT test and we don't have the infrastructure for that at the moment.

rdar://126772381
This commit is contained in:
Lang Hames
2024-05-09 23:20:31 +10:00
parent c73516af10
commit cbf1535cc8

View File

@@ -109,6 +109,7 @@ void EPCGenericDylibManager::lookupAsync(tpctypes::DylibHandle H,
if (SerializationErr) {
cantFail(Result.takeError());
Complete(std::move(SerializationErr));
return;
}
Complete(std::move(Result));
},