mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Caching] Re-associate diagnostics cache key with InputFile
Change how cached diagnostics are stored inside the CAS. It used to be stored as a standalone entry for a frontend invocation in the cache and now it is switched to be associated with input files, stored together with other outputs like object files, etc. This enables cleaner Cache Replay APIs and future cached diagnostics that can be splitted up by file contribution.
This commit is contained in:
@@ -157,6 +157,12 @@ void SwiftCASOutputBackend::Implementation::initBackend(
|
||||
});
|
||||
};
|
||||
llvm::for_each(InputsAndOutputs.getAllInputs(), addInput);
|
||||
|
||||
// FIXME: Cached diagnostics is associated with the first output producing
|
||||
// input file.
|
||||
OutputToInputMap.insert({"<cached-diagnostics>",
|
||||
{InputsAndOutputs.getFirstOutputProducingInput(),
|
||||
file_types::TY_CachedDiagnostics}});
|
||||
}
|
||||
|
||||
Error SwiftCASOutputBackend::Implementation::storeImpl(
|
||||
|
||||
Reference in New Issue
Block a user