@@ -944,7 +944,6 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
944944 SmallVector<OutputEntry> OutputProxies;
945945 std::optional<llvm::cas::ObjectProxy> DiagnosticsOutput;
946946 bool UseCASBackend = Invocation.getIRGenOptions ().UseCASBackend ;
947- std::string ObjFile;
948947
949948 swift::cas::CachedResultLoader Loader (CAS, Comp.Output );
950949 if (auto Err = Loader.replay (
@@ -958,9 +957,6 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
958957 if (!Proxy)
959958 return Proxy.takeError ();
960959
961- if (Kind == file_types::ID::TY_Object && UseCASBackend)
962- ObjFile = OutputPath->second ;
963-
964960 if (Kind == file_types::ID::TY_CachedDiagnostics) {
965961 assert (!DiagnosticsOutput && " more than 1 diagnostics found" );
966962 DiagnosticsOutput = std::move (*Proxy);
@@ -1008,7 +1004,7 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
10081004 auto File = Backend.createFile (Output.Path );
10091005 if (!File)
10101006 return File.takeError ();
1011- if (UseCASBackend && Output.Path == ObjFile ) {
1007+ if (UseCASBackend && Output.Kind == file_types::ID::TY_Object ) {
10121008 auto Schema = std::make_unique<llvm::mccasformats::v1::MCSchema>(CAS);
10131009 if (auto E = Schema->serializeObjectFile (Output.Proxy , *File))
10141010 Inst.getDiags ().diagnose (SourceLoc (), diag::error_mccas,
0 commit comments