mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Caching] Fix an assertion error when replayDiagnostic failed
Fix an assertion when replayDiagnostics failed in libSwiftScan.
This commit is contained in:
@@ -981,8 +981,11 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
|
||||
DH.initDiagConsumers(Invocation);
|
||||
DH.beginMessage(Invocation, Instance.Args);
|
||||
|
||||
if (auto E = CDP->replayCachedDiagnostics(DiagnosticsOutput->getData()))
|
||||
if (auto E = CDP->replayCachedDiagnostics(DiagnosticsOutput->getData())) {
|
||||
DH.endMessage(/*ReturnCode=*/1);
|
||||
Inst.getDiags().finishProcessing();
|
||||
return E;
|
||||
}
|
||||
|
||||
if (Remarks)
|
||||
Inst.getDiags().diagnose(SourceLoc(), diag::replay_output,
|
||||
|
||||
Reference in New Issue
Block a user