@@ -944,7 +944,6 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
944
944
SmallVector<OutputEntry> OutputProxies;
945
945
std::optional<llvm::cas::ObjectProxy> DiagnosticsOutput;
946
946
bool UseCASBackend = Invocation.getIRGenOptions ().UseCASBackend ;
947
- std::string ObjFile;
948
947
949
948
swift::cas::CachedResultLoader Loader (CAS, Comp.Output );
950
949
if (auto Err = Loader.replay (
@@ -958,9 +957,6 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
958
957
if (!Proxy)
959
958
return Proxy.takeError ();
960
959
961
- if (Kind == file_types::ID::TY_Object && UseCASBackend)
962
- ObjFile = OutputPath->second ;
963
-
964
960
if (Kind == file_types::ID::TY_CachedDiagnostics) {
965
961
assert (!DiagnosticsOutput && " more than 1 diagnostics found" );
966
962
DiagnosticsOutput = std::move (*Proxy);
@@ -1008,7 +1004,7 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance,
1008
1004
auto File = Backend.createFile (Output.Path );
1009
1005
if (!File)
1010
1006
return File.takeError ();
1011
- if (UseCASBackend && Output.Path == ObjFile ) {
1007
+ if (UseCASBackend && Output.Kind == file_types::ID::TY_Object ) {
1012
1008
auto Schema = std::make_unique<llvm::mccasformats::v1::MCSchema>(CAS);
1013
1009
if (auto E = Schema->serializeObjectFile (Output.Proxy , *File))
1014
1010
Inst.getDiags ().diagnose (SourceLoc (), diag::error_mccas,
0 commit comments